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)
235
+
// First element is <os>[(<OSVersion>[+<OSFeature>]*)]
236
+
osOptions:=osRe.FindStringSubmatch(part)
237
+
ifosOptions==nil {
238
+
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)
238
239
}
239
240
240
-
p.OS=normalizeOS(osVer[1])
241
-
p.OSVersion=osVer[2]
241
+
p.OS=normalizeOS(osOptions[1])
242
+
p.OSVersion=osOptions[2]
243
+
ifosOptions[3] !="" {
244
+
p.OSFeatures=strings.Split(osOptions[3][1:], "+")
245
+
}
242
246
} else {
243
247
if!specifierRe.MatchString(part) {
244
248
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