diff --git a/cmd/ctr/list.go b/cmd/ctr/list.go index 6b93a8c27..14c9d0fdc 100644 --- a/cmd/ctr/list.go +++ b/cmd/ctr/list.go @@ -84,10 +84,8 @@ var listCommand = cli.Command{ ); err != nil { return err } - if err := w.Flush(); err != nil { - return err - } } - return nil + + return w.Flush() }, } diff --git a/cmd/ctr/namespaces.go b/cmd/ctr/namespaces.go index 283bfe464..784a61856 100644 --- a/cmd/ctr/namespaces.go +++ b/cmd/ctr/namespaces.go @@ -156,7 +156,8 @@ var namespacesListCommand = cli.Command{ fmt.Fprintf(tw, "%v\t%v\t\n", ns, strings.Join(labelStrings, ",")) } - tw.Flush() + + return tw.Flush() } return nil diff --git a/cmd/dist/active.go b/cmd/dist/active.go index 699c63af1..a5935c5d2 100644 --- a/cmd/dist/active.go +++ b/cmd/dist/active.go @@ -46,15 +46,14 @@ var activeCommand = cli.Command{ } tw := tabwriter.NewWriter(os.Stdout, 1, 8, 1, '\t', 0) - fmt.Fprintln(tw, "REF\tSIZE\tAGE") + fmt.Fprintln(tw, "REF\tSIZE\tAGE\t") for _, active := range active { - fmt.Fprintf(tw, "%s\t%s\t%s\n", + fmt.Fprintf(tw, "%s\t%s\t%s\t\n", active.Ref, units.HumanSize(float64(active.Offset)), units.HumanDuration(time.Since(active.StartedAt))) } - tw.Flush() - return nil + return tw.Flush() }, } diff --git a/cmd/dist/images.go b/cmd/dist/images.go index d6db0b411..ec39f1a4d 100644 --- a/cmd/dist/images.go +++ b/cmd/dist/images.go @@ -57,9 +57,8 @@ var imagesListCommand = cli.Command{ fmt.Fprintf(tw, "%v\t%v\t%v\t%v\t\n", image.Name, image.Target.MediaType, image.Target.Digest, progress.Bytes(size)) } - tw.Flush() - return nil + return tw.Flush() }, }