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:
Derek McGowan
2018-08-23 10:51:13 -07:00
parent 830363acac
commit 9edcfcc1cb
12 changed files with 370 additions and 72 deletions

View File

@@ -113,7 +113,7 @@ func NewFetchConfig(ctx context.Context, clicontext *cli.Context) (*FetchConfig,
if !clicontext.Bool("all-platforms") {
p := clicontext.StringSlice("platform")
if len(p) == 0 {
p = append(p, platforms.Default())
p = append(p, platforms.DefaultString())
}
config.Platforms = p
}