| 
						
						
							
								
							
						
						
					 | 
					 | 
					@ -7,6 +7,7 @@ import (
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						"fmt"
 | 
					 | 
					 | 
					 | 
						"fmt"
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						"io"
 | 
					 | 
					 | 
					 | 
						"io"
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						"os"
 | 
					 | 
					 | 
					 | 
						"os"
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
						"sort"
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						"strings"
 | 
					 | 
					 | 
					 | 
						"strings"
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						"text/tabwriter"
 | 
					 | 
					 | 
					 | 
						"text/tabwriter"
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						"text/template"
 | 
					 | 
					 | 
					 | 
						"text/template"
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					 | 
					@ -17,6 +18,7 @@ import (
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						binfotypes "github.com/moby/buildkit/util/buildinfo/types"
 | 
					 | 
					 | 
					 | 
						binfotypes "github.com/moby/buildkit/util/buildinfo/types"
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						ocispecs "github.com/opencontainers/image-spec/specs-go/v1"
 | 
					 | 
					 | 
					 | 
						ocispecs "github.com/opencontainers/image-spec/specs-go/v1"
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						"github.com/pkg/errors"
 | 
					 | 
					 | 
					 | 
						"github.com/pkg/errors"
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
						"golang.org/x/sync/errgroup"
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					)
 | 
					 | 
					 | 
					 | 
					)
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					const defaultPfx = "  "
 | 
					 | 
					 | 
					 | 
					const defaultPfx = "  "
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
					 | 
					@ -109,18 +111,28 @@ func (p *Printer) Print(raw bool, out io.Writer) error {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						imageconfigs := make(map[string]*ocispecs.Image)
 | 
					 | 
					 | 
					 | 
						imageconfigs := make(map[string]*ocispecs.Image)
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						buildinfos := make(map[string]*binfotypes.BuildInfo)
 | 
					 | 
					 | 
					 | 
						buildinfos := make(map[string]*binfotypes.BuildInfo)
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						for _, pform := range p.platforms {
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
							img, dtic, err := p.getImageConfig(&pform)
 | 
					 | 
					 | 
					 | 
						eg, _ := errgroup.WithContext(p.ctx)
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
						for _, platform := range p.platforms {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
							func(platform ocispecs.Platform) {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
								eg.Go(func() error {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
									img, dtic, err := p.getImageConfig(&platform)
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
									if err != nil {
 | 
					 | 
					 | 
					 | 
									if err != nil {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
										return err
 | 
					 | 
					 | 
					 | 
										return err
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
									} else if img != nil {
 | 
					 | 
					 | 
					 | 
									} else if img != nil {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
								imageconfigs[platforms.Format(pform)] = img
 | 
					 | 
					 | 
					 | 
										imageconfigs[platforms.Format(platform)] = img
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
									}
 | 
					 | 
					 | 
					 | 
									}
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
									if bi, err := p.getBuildInfo(dtic); err != nil {
 | 
					 | 
					 | 
					 | 
									if bi, err := p.getBuildInfo(dtic); err != nil {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
										return err
 | 
					 | 
					 | 
					 | 
										return err
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
									} else if bi != nil {
 | 
					 | 
					 | 
					 | 
									} else if bi != nil {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
								buildinfos[platforms.Format(pform)] = bi
 | 
					 | 
					 | 
					 | 
										buildinfos[platforms.Format(platform)] = bi
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
									}
 | 
					 | 
					 | 
					 | 
									}
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
									return nil
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
								})
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
							}(platform)
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
						}
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
						if err := eg.Wait(); err != nil {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
							return err
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						}
 | 
					 | 
					 | 
					 | 
						}
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						format := tpl.Root.String()
 | 
					 | 
					 | 
					 | 
						format := tpl.Root.String()
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
					 | 
					@ -164,13 +176,13 @@ func (p *Printer) Print(raw bool, out io.Writer) error {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
									BuildInfo: buildinfos,
 | 
					 | 
					 | 
					 | 
									BuildInfo: buildinfos,
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
								})
 | 
					 | 
					 | 
					 | 
								})
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
							}
 | 
					 | 
					 | 
					 | 
							}
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
							var imageconfig *ocispecs.Image
 | 
					 | 
					 | 
					 | 
							var ic *ocispecs.Image
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
							for _, ic := range imageconfigs {
 | 
					 | 
					 | 
					 | 
							for _, v := range imageconfigs {
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
								imageconfig = ic
 | 
					 | 
					 | 
					 | 
								ic = v
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
							}
 | 
					 | 
					 | 
					 | 
							}
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
							var buildinfo *binfotypes.BuildInfo
 | 
					 | 
					 | 
					 | 
							var bi *binfotypes.BuildInfo
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
							for _, bi := range buildinfos {
 | 
					 | 
					 | 
					 | 
							for _, v := range buildinfos {
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
								buildinfo = bi
 | 
					 | 
					 | 
					 | 
								bi = v
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
							}
 | 
					 | 
					 | 
					 | 
							}
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
							return tpl.Execute(out, struct {
 | 
					 | 
					 | 
					 | 
							return tpl.Execute(out, struct {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
								Name      string                `json:"name,omitempty"`
 | 
					 | 
					 | 
					 | 
								Name      string                `json:"name,omitempty"`
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					 | 
					@ -180,8 +192,8 @@ func (p *Printer) Print(raw bool, out io.Writer) error {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
							}{
 | 
					 | 
					 | 
					 | 
							}{
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
								Name:      p.name,
 | 
					 | 
					 | 
					 | 
								Name:      p.name,
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
								Manifest:  manifest,
 | 
					 | 
					 | 
					 | 
								Manifest:  manifest,
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
								Image:     imageconfig,
 | 
					 | 
					 | 
					 | 
								Image:     ic,
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
								BuildInfo: buildinfo,
 | 
					 | 
					 | 
					 | 
								BuildInfo: bi,
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
							})
 | 
					 | 
					 | 
					 | 
							})
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						}
 | 
					 | 
					 | 
					 | 
						}
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
					 | 
					@ -230,14 +242,22 @@ func (p *Printer) printManifestList(out io.Writer) error {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					}
 | 
					 | 
					 | 
					 | 
					}
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					func (p *Printer) printBuildInfos(bis map[string]*binfotypes.BuildInfo, out io.Writer) error {
 | 
					 | 
					 | 
					 | 
					func (p *Printer) printBuildInfos(bis map[string]*binfotypes.BuildInfo, out io.Writer) error {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						if len(bis) == 1 {
 | 
					 | 
					 | 
					 | 
						if len(bis) == 0 {
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
							return nil
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
						} else if len(bis) == 1 {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
							for _, bi := range bis {
 | 
					 | 
					 | 
					 | 
							for _, bi := range bis {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
								return p.printBuildInfo(bi, "", out)
 | 
					 | 
					 | 
					 | 
								return p.printBuildInfo(bi, "", out)
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
							}
 | 
					 | 
					 | 
					 | 
							}
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						}
 | 
					 | 
					 | 
					 | 
						}
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						for pform, bi := range bis {
 | 
					 | 
					 | 
					 | 
						var pkeys []string
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
						for _, pform := range p.platforms {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
							pkeys = append(pkeys, platforms.Format(pform))
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
						}
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
						sort.Strings(pkeys)
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
						for _, platform := range pkeys {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
							bi := bis[platform]
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
							w := tabwriter.NewWriter(out, 0, 0, 1, ' ', 0)
 | 
					 | 
					 | 
					 | 
							w := tabwriter.NewWriter(out, 0, 0, 1, ' ', 0)
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
							_, _ = fmt.Fprintf(w, "\t\nPlatform:\t%s\t\n", pform)
 | 
					 | 
					 | 
					 | 
							_, _ = fmt.Fprintf(w, "\t\nPlatform:\t%s\t\n", platform)
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
							_ = w.Flush()
 | 
					 | 
					 | 
					 | 
							_ = w.Flush()
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
							if err := p.printBuildInfo(bi, "", out); err != nil {
 | 
					 | 
					 | 
					 | 
							if err := p.printBuildInfo(bi, "", out); err != nil {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
								return err
 | 
					 | 
					 | 
					 | 
								return err
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
						
					 | 
					 | 
					
 
 |