@@ -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 listSIGs []string
89
+ var listSIGsAndWGs []string
90
90
91
91
func init () {
92
92
resp , err := http .Get ("https://raw.githubusercontent.com/kubernetes/community/master/sigs.yaml" )
@@ -95,20 +95,20 @@ func init() {
95
95
os .Exit (1 )
96
96
}
97
97
defer resp .Body .Close ()
98
- re := regexp .MustCompile (`- dir: sig- (.*)$` )
98
+ re := regexp .MustCompile (`- dir: (.*)$` )
99
99
100
100
scanner := bufio .NewScanner (resp .Body )
101
101
for scanner .Scan () {
102
102
match := re .FindStringSubmatch (scanner .Text ())
103
103
if len (match )> 0 {
104
- listSIGs = append (listSIGs , "sig-" + match [1 ])
104
+ listSIGsAndWGs = append (listSIGsAndWGs , 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 (listSIGs )
111
+ sort .Strings (listSIGsAndWGs )
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 (listSIGs , v )
151
- if index >= len (listSIGs ) || listSIGs [index ] != v {
152
- return & ValueMustBeOneOf {k , v , listSIGs }
150
+ index := sort .SearchStrings (listSIGsAndWGs , v )
151
+ if index >= len (listSIGsAndWGs ) || listSIGsAndWGs [index ] != v {
152
+ return & ValueMustBeOneOf {k , v , listSIGsAndWGs }
153
153
}
154
154
// optional strings
155
155
case "editor" :
0 commit comments