cmd/{dist, ctr}: cleanup flushing and alignment
Signed-off-by: Stephen J Day <stephen.day@docker.com>
This commit is contained in:
parent
b4b16a1d45
commit
5d13f8027c
@ -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()
|
||||
},
|
||||
}
|
||||
|
@ -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
|
||||
|
7
cmd/dist/active.go
vendored
7
cmd/dist/active.go
vendored
@ -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()
|
||||
},
|
||||
}
|
||||
|
3
cmd/dist/images.go
vendored
3
cmd/dist/images.go
vendored
@ -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()
|
||||
},
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user