@@ -86,7 +86,7 @@ func (m *MustHaveAtLeastOneValue) Error() string {
86
86
return fmt .Sprintf ("%q must have at least one value" , m .key )
87
87
}
88
88
89
- var listSIGsAndWGs []string
89
+ var listGroups []string
90
90
91
91
func init () {
92
92
resp , err := http .Get ("https://raw.githubusercontent.com/kubernetes/community/master/sigs.yaml" )
@@ -101,14 +101,14 @@ func init() {
101
101
for scanner .Scan () {
102
102
match := re .FindStringSubmatch (scanner .Text ())
103
103
if len (match )> 0 {
104
- listSIGsAndWGs = append (listSIGsAndWGs , match [1 ])
104
+ listGroups = append (listGroups , match [1 ])
105
105
}
106
106
}
107
107
if err := scanner .Err (); err != nil {
108
108
fmt .Fprintf (os .Stderr , "unable to scan list of sigs: %v" , err )
109
109
os .Exit (1 )
110
110
}
111
- sort .Strings (listSIGsAndWGs )
111
+ sort .Strings (listGroups )
112
112
}
113
113
114
114
var mandatoryKeys = []string {"title" , "owning-sig" }
@@ -147,9 +147,9 @@ func ValidateStructure(parsed map[interface{}]interface{}) error {
147
147
return & ValueMustBeString {k , v }
148
148
}
149
149
v , _ := value .(string )
150
- index := sort .SearchStrings (listSIGsAndWGs , v )
151
- if index >= len (listSIGsAndWGs ) || listSIGsAndWGs [index ] != v {
152
- return & ValueMustBeOneOf {k , v , listSIGsAndWGs }
150
+ index := sort .SearchStrings (listGroups , v )
151
+ if index >= len (listGroups ) || listGroups [index ] != v {
152
+ return & ValueMustBeOneOf {k , v , listGroups }
153
153
}
154
154
// optional strings
155
155
case "editor" :
@@ -193,9 +193,9 @@ func ValidateStructure(parsed map[interface{}]interface{}) error {
193
193
if strings .ToLower (k ) == "participating-sigs" {
194
194
for _ , value := range values {
195
195
v := value .(string )
196
- index := sort .SearchStrings (listSIGsAndWGs , v )
197
- if index >= len (listSIGsAndWGs ) || listSIGsAndWGs [index ] != v {
198
- return & ValueMustBeOneOf {k , v , listSIGsAndWGs }
196
+ index := sort .SearchStrings (listGroups , v )
197
+ if index >= len (listGroups ) || listGroups [index ] != v {
198
+ return & ValueMustBeOneOf {k , v , listGroups }
199
199
}
200
200
}
201
201
}
0 commit comments