Add platform match comparer interface
Adds a new platform interface for matching and comparing platforms. This new interface allows both filtering and ordering of platforms to support running multiple platform and choosing the best platform. Signed-off-by: Derek McGowan <derek@mcgstyle.net>
This commit is contained in:
@@ -22,8 +22,13 @@ import (
|
||||
specs "github.com/opencontainers/image-spec/specs-go/v1"
|
||||
)
|
||||
|
||||
// Default returns the default specifier for the platform.
|
||||
func Default() string {
|
||||
// Default returns the default matcher for the platform.
|
||||
func Default() MatchComparer {
|
||||
return Only(DefaultSpec())
|
||||
}
|
||||
|
||||
// DefaultString returns the default string specifier for the platform.
|
||||
func DefaultString() string {
|
||||
return Format(DefaultSpec())
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user