@@ -70,7 +70,7 @@ func ValidateVersion(spec *Spec) error {
70
70
if err != nil {
71
71
return fmt .Errorf ("could not determine minimum required version: %w" , err )
72
72
}
73
- if newVersion (minVersion ).IsGreaterThan (newVersion (spec .Version )) {
73
+ if newVersion (minVersion ).isGreaterThan (newVersion (spec .Version )) {
74
74
return fmt .Errorf ("the spec version must be at least v%v" , minVersion )
75
75
}
76
76
return nil
@@ -96,13 +96,13 @@ func (v version) String() string {
96
96
return strings .TrimPrefix (string (v ), "v" )
97
97
}
98
98
99
- // IsGreaterThan checks with a version is greater than the specified version.
100
- func (v version ) IsGreaterThan (o version ) bool {
99
+ // isGreaterThan checks with a version is greater than the specified version.
100
+ func (v version ) isGreaterThan (o version ) bool {
101
101
return semver .Compare (string (v ), string (o )) > 0
102
102
}
103
103
104
- // IsLatest checks whether the version is the latest supported version
105
- func (v version ) IsLatest () bool {
104
+ // isLatest checks whether the version is the latest supported version
105
+ func (v version ) isLatest () bool {
106
106
return v == vCurrent
107
107
}
108
108
@@ -126,11 +126,11 @@ func (r requiredVersionMap) requiredVersion(spec *Spec) version {
126
126
if isRequired == nil {
127
127
continue
128
128
}
129
- if isRequired (spec ) && v .IsGreaterThan (minVersion ) {
129
+ if isRequired (spec ) && v .isGreaterThan (minVersion ) {
130
130
minVersion = v
131
131
}
132
132
// If we have already detected the latest version then no later version could be detected
133
- if minVersion .IsLatest () {
133
+ if minVersion .isLatest () {
134
134
break
135
135
}
136
136
}
@@ -183,7 +183,7 @@ func requiresV060(spec *Spec) bool {
183
183
}
184
184
185
185
// The v0.6.0 spec allows dots "." in Kind name label (class)
186
- vendor , class := ParseQualifier (spec .Kind )
186
+ vendor , class := parseQualifier (spec .Kind )
187
187
if vendor != "" {
188
188
if strings .ContainsRune (class , '.' ) {
189
189
return true
@@ -199,7 +199,7 @@ func requiresV050(spec *Spec) bool {
199
199
200
200
for _ , d := range spec .Devices {
201
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 ])) {
202
+ if len (d .Name ) > 0 && ! isLetter (rune (d .Name [0 ])) {
203
203
return true
204
204
}
205
205
edits = append (edits , & d .ContainerEdits )
0 commit comments