commands: add platforms dedupe

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
This commit is contained in:
Tonis Tiigi
2019-04-17 17:55:27 -07:00
parent e773d0eb2a
commit e40318e2cc
7 changed files with 117 additions and 14 deletions

View File

@ -14,6 +14,7 @@ import (
"github.com/moby/buildkit/util/appcontext"
"github.com/spf13/cobra"
"github.com/tonistiigi/buildx/store"
"github.com/tonistiigi/buildx/util/platformutil"
"golang.org/x/sync/errgroup"
)
@ -129,7 +130,7 @@ func printngi(w io.Writer, ngi *nginfo) {
if err != "" {
fmt.Fprintf(w, " %s\t%s\t%s\n", n.Name, n.Endpoint, err)
} else {
fmt.Fprintf(w, " %s\t%s\t%s\t%s\n", n.Name, n.Endpoint, status, strings.Join(p, ", "))
fmt.Fprintf(w, " %s\t%s\t%s\t%s\n", n.Name, n.Endpoint, status, strings.Join(platformutil.Format(p), ", "))
}
}
}