File tree Expand file tree Collapse file tree 2 files changed +6
-48
lines changed Expand file tree Collapse file tree 2 files changed +6
-48
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -183,23 +183,20 @@ func requiresV060(spec *Spec) bool {
183183 }
184184
185185 // The v0.6.0 spec allows dots "." in Kind name label (class)
186- vendor , class := parseQualifier (spec .Kind )
187- if vendor != "" {
188- if strings .ContainsRune (class , '.' ) {
189- return true
190- }
186+ if ! strings .Contains (spec .Kind , "/" ) {
187+ return false
191188 }
192-
193- return false
189+ class := strings . SplitN ( spec . Kind , "/" , 2 )[ 1 ]
190+ return strings . Contains ( class , "." )
194191}
195192
196193// requiresV050 returns true if the spec uses v0.5.0 features
197194func requiresV050 (spec * Spec ) bool {
198195 var edits []* ContainerEdits
199196
200197 for _ , d := range spec .Devices {
201- // The v0.5.0 spec allowed device names to start with a digit instead of requiring a letter
202- if len (d .Name ) > 0 && ! isLetter ( rune ( d .Name [0 ])) {
198+ // The v0.5.0 spec allowed device name to start with a digit
199+ if len (d .Name ) > 0 && '0' <= d .Name [0 ] && d . Name [ 0 ] <= '9' {
203200 return true
204201 }
205202 edits = append (edits , & d .ContainerEdits )
You can’t perform that action at this time.
0 commit comments