2024-01-31 01:36:54 -06:00
|
|
|
// This is a simple example
|
|
|
|
package main
|
|
|
|
|
|
|
|
import (
|
|
|
|
"strings"
|
2024-02-18 15:09:04 -06:00
|
|
|
|
|
|
|
"go.wit.com/lib/gui/repolist"
|
2024-01-31 01:36:54 -06:00
|
|
|
)
|
|
|
|
|
|
|
|
func initWhitelist() {
|
2024-02-20 16:11:00 -06:00
|
|
|
me.release.whitelist = make(map[string]*repolist.Repo)
|
2024-02-18 15:09:04 -06:00
|
|
|
for _, repo := range me.repos.View.AllRepos() {
|
|
|
|
if strings.HasPrefix(repo.GoPath(), "go.wit.com/dev/davecgh") {
|
2024-02-20 16:11:00 -06:00
|
|
|
me.release.whitelist[repo.GoPath()] = repo
|
2024-01-31 01:36:54 -06:00
|
|
|
}
|
2024-02-18 17:55:59 -06:00
|
|
|
//
|
|
|
|
// if repo.String() == "go.wit.com/apps/guireleaser" {
|
2024-02-20 16:11:00 -06:00
|
|
|
// me.release.whitelist[repo.String()] = repo
|
2024-02-18 17:55:59 -06:00
|
|
|
// }
|
|
|
|
//
|
|
|
|
// if repo.String() == "go.wit.com/lib/gui/repostatus" {
|
2024-02-20 16:11:00 -06:00
|
|
|
// me.release.whitelist[repo.String()] = repo
|
2024-02-18 17:55:59 -06:00
|
|
|
// }
|
|
|
|
//
|
2024-01-31 01:36:54 -06:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
func whitelist(path string) bool {
|
|
|
|
// log.Info("whitelist START", path)
|
|
|
|
if me.ignoreWhitelist.Checked() {
|
2024-01-31 01:41:38 -06:00
|
|
|
return false
|
2024-01-31 01:36:54 -06:00
|
|
|
}
|
|
|
|
|
2024-02-20 16:11:00 -06:00
|
|
|
_, ok := me.release.whitelist[path]
|
2024-01-31 01:36:54 -06:00
|
|
|
if ok {
|
|
|
|
// log.Info("whitelist ok == true", path)
|
|
|
|
return true
|
|
|
|
}
|
|
|
|
// log.Info("whitelist ok == false", path)
|
|
|
|
return false
|
|
|
|
}
|