You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Updates the os part of the format to include features after the os
version. The guarantees that the format may fully represent the platform
structure.
Signed-off-by: Derek McGowan <[email protected]>
return specs.Platform{}, fmt.Errorf("%q is an invalid OS component of %q: OSAndVersion specifier component must match %q: %w", part, specifier, osAndVersionRe.String(), errInvalidArgument)
202
+
// First element is <os>[(<OSVersion>[+<OSFeature>]*)]
203
+
osOptions:=osRe.FindStringSubmatch(part)
204
+
ifosOptions==nil {
205
+
return specs.Platform{}, fmt.Errorf("%q is an invalid OS component of %q: OSAndVersion specifier component must match %q: %w", part, specifier, osRe.String(), errInvalidArgument)
205
206
}
206
207
207
-
p.OS=normalizeOS(osVer[1])
208
-
p.OSVersion=osVer[2]
208
+
p.OS=normalizeOS(osOptions[1])
209
+
p.OSVersion=osOptions[2]
210
+
ifosOptions[3] !="" {
211
+
p.OSFeatures=strings.Split(osOptions[3][1:], "+")
212
+
}
209
213
} else {
210
214
if!specifierRe.MatchString(part) {
211
215
return specs.Platform{}, fmt.Errorf("%q is an invalid component of %q: platform specifier component must match %q: %w", part, specifier, specifierRe.String(), errInvalidArgument)
0 commit comments