summaryrefslogtreecommitdiff
path: root/whitelist.go
blob: 0b98f981f3843a9f5dededd7612bf447a9eccba4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
// This is a simple example
package main

import (
	"strings"

	"go.wit.com/lib/gui/repolist"
)

func initWhitelist() {
	me.release.whitelist = make(map[string]*repolist.Repo)
	for _, repo := range me.repos.View.AllRepos() {
		if strings.HasPrefix(repo.GoPath(), "go.wit.com/dev/davecgh") {
			me.release.whitelist[repo.GoPath()] = repo
		}
		//
		//	if repo.String() == "go.wit.com/apps/guireleaser" {
		//		me.release.whitelist[repo.String()] = repo
		//	}
		//
		//	if repo.String() == "go.wit.com/lib/gui/repostatus" {
		//		me.release.whitelist[repo.String()] = repo
		//	}
		//
	}
}

func whitelist(path string) bool {
	// log.Info("whitelist START", path)
	if me.ignoreWhitelist.Checked() {
		return false
	}

	_, ok := me.release.whitelist[path]
	if ok {
		// log.Info("whitelist ok == true", path)
		return true
	}
	// log.Info("whitelist ok == false", path)
	return false
}