mirror of https://github.com/docker/cli.git
Fix cyclomatic complexity of two formatters
Signed-off-by: Daniel Nephin <dnephin@docker.com>
This commit is contained in:
parent
0c6b8d717d
commit
c60d13e539
|
@ -65,7 +65,9 @@ reclaimable: {{.Reclaimable}}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (ctx *DiskUsageContext) Write() (err error) {
|
func (ctx *DiskUsageContext) Write() (err error) {
|
||||||
if !ctx.Verbose {
|
if ctx.Verbose {
|
||||||
|
return ctx.verboseWrite()
|
||||||
|
}
|
||||||
ctx.buffer = bytes.NewBufferString("")
|
ctx.buffer = bytes.NewBufferString("")
|
||||||
ctx.preFormat()
|
ctx.preFormat()
|
||||||
|
|
||||||
|
@ -108,6 +110,7 @@ func (ctx *DiskUsageContext) Write() (err error) {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (ctx *DiskUsageContext) verboseWrite() (err error) {
|
||||||
// First images
|
// First images
|
||||||
tmpl, err := ctx.startSubsection(defaultDiskUsageImageTableFormat)
|
tmpl, err := ctx.startSubsection(defaultDiskUsageImageTableFormat)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
Loading…
Reference in New Issue