37 lines
775 B
Go
37 lines
775 B
Go
// This is a simple example
|
|
package main
|
|
|
|
import (
|
|
"strings"
|
|
)
|
|
|
|
func initWhitelist() {
|
|
release.whitelist = make(map[string]*repo)
|
|
for _, repo := range me.allrepos {
|
|
if strings.HasPrefix(repo.String(), "go.wit.com/dev/") {
|
|
release.whitelist[repo.String()] = repo
|
|
}
|
|
if repo.String() == "go.wit.com/apps/guireleaser" {
|
|
release.whitelist[repo.String()] = repo
|
|
}
|
|
if repo.String() == "go.wit.com/lib/gui/repostatus" {
|
|
release.whitelist[repo.String()] = repo
|
|
}
|
|
}
|
|
}
|
|
|
|
func whitelist(path string) bool {
|
|
// log.Info("whitelist START", path)
|
|
if me.ignoreWhitelist.Checked() {
|
|
return false
|
|
}
|
|
|
|
_, ok := release.whitelist[path]
|
|
if ok {
|
|
// log.Info("whitelist ok == true", path)
|
|
return true
|
|
}
|
|
// log.Info("whitelist ok == false", path)
|
|
return false
|
|
}
|