Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewMatchComparer ¶
func NewMatchComparer(all bool, ss []string) (platforms.MatchComparer, error)
Ported from nerdctl project, copyright The containerd Authors. https://github.com/containerd/nerdctl/blob/0f1c52a2d5c76b49789699d0a0018a99e4c1cff8/pkg/platformutil/platformutil.go#L40
NewMatchComparer returns MatchComparer. If all is true, NewMatchComparer always returns All, regardless to the value of ss. If all is false and ss is empty, NewMatchComparer returns DefaultStrict (not Default). Otherwise NewMatchComparer returns Ordered MatchComparer.
func NewOCISpecPlatformSlice ¶
Ported from nerdctl project, copyright The containerd Authors. https://github.com/containerd/nerdctl/blob/0f1c52a2d5c76b49789699d0a0018a99e4c1cff8/pkg/platformutil/platformutil.go#L56
NewOCISpecPlatformSlice returns a slice of ocispec.Platform If all is true, NewOCISpecPlatformSlice always returns an empty slice, regardless to the value of ss. If all is false and ss is empty, NewOCISpecPlatformSlice returns DefaultSpec. Otherwise NewOCISpecPlatformSlice returns the slice that correspond to ss.
func ParsePlatforms ¶
func ParsePlatforms(all bool, ss string) (platforms.MatchComparer, error)
Parse platform strings into MatchComparer, ss is multiple platforms split by ",", For example: linux/amd64,linux/arm64
Types ¶
This section is empty.