rename Private to Direct (#481)

This commit is contained in:
Michal Pristas
2018-08-14 11:13:36 +02:00
committed by GitHub
parent 72a4af135a
commit 327fecaedd
5 changed files with 9 additions and 9 deletions
+2 -2
View File
@@ -134,8 +134,8 @@ func (f *Filter) initFromConfig() {
rule = Include
case "-":
rule = Exclude
case "P":
rule = Private
case "D":
rule = Direct
default:
continue
}
+2 -2
View File
@@ -10,6 +10,6 @@ const (
Include
// Exclude filter rule excludes package and its children from communication
Exclude
// Private filter rule forces the package to be fetched only from the vcs
Private
// Direct filter rule forces the package to be fetched directly from the vcs
Direct
)
+3 -3
View File
@@ -55,16 +55,16 @@ func (t *FilterTests) Test_OnlyAllowed() {
r.Equal(Exclude, f.Rule("bitbucket.com/a/b"))
}
func (t *FilterTests) Test_Private() {
func (t *FilterTests) Test_Direct() {
r := t.Require()
f := NewFilter()
f.AddRule("github.com/a/b/c", Exclude)
f.AddRule("github.com/a/b", Private)
f.AddRule("github.com/a/b", Direct)
f.AddRule("github.com/a", Include)
f.AddRule("", Exclude)
r.Equal(Include, f.Rule("github.com/a"))
r.Equal(Private, f.Rule("github.com/a/b"))
r.Equal(Direct, f.Rule("github.com/a/b"))
r.Equal(Exclude, f.Rule("github.com/a/b/c/d"))
}