Skip to content

Commit 3a94703

Browse files
committed
Simplify info output
1 parent eba83f3 commit 3a94703

1 file changed

Lines changed: 3 additions & 7 deletions

File tree

main.go

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import (
1010
"text/tabwriter"
1111

1212
"github.com/dustin/go-humanize"
13-
"github.com/google/go-containerregistry/pkg/v1"
13+
v1 "github.com/google/go-containerregistry/pkg/v1"
1414
"github.com/google/go-containerregistry/pkg/v1/tarball"
1515
"github.com/urfave/cli/v2"
1616
)
@@ -92,7 +92,7 @@ func info(cfg *config) error {
9292
}
9393

9494
tw := tabwriter.NewWriter(os.Stdout, 0, 0, 2, ' ', 0)
95-
tw.Write([]byte("N\tLayer\tSize\tHuman\tType\n"))
95+
tw.Write([]byte("N\tLayer\tSize\n"))
9696
for i, layer := range layers {
9797
hash, err := layer.DiffID()
9898
if err != nil {
@@ -103,11 +103,7 @@ func info(cfg *config) error {
103103
return err
104104
}
105105
hs := humanize.Bytes(uint64(size))
106-
mt, err := layer.MediaType()
107-
if err != nil {
108-
return err
109-
}
110-
fmt.Fprintf(tw, "%d\t%s\t%d\t%s\t%s\n", i+1, hash, size, hs, mt)
106+
fmt.Fprintf(tw, "%d\t%s\t%s\n", i+1, hash, hs)
111107
}
112108

113109
return tw.Flush()

0 commit comments

Comments
 (0)