guireleaser/whitelist.go

42 lines
869 B
Go
Raw Normal View History

// This is a simple example
package main
import (
"strings"
2024-02-18 15:09:04 -06:00
"go.wit.com/lib/gui/repolist"
)
func initWhitelist() {
2024-02-18 15:09:04 -06:00
release.whitelist = make(map[string]*repolist.Repo)
for _, repo := range me.repos.View.AllRepos() {
if strings.HasPrefix(repo.GoPath(), "go.wit.com/dev/davecgh") {
release.whitelist[repo.GoPath()] = repo
}
2024-02-18 17:55:59 -06:00
//
// 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
}