format code with gofumpt
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
@ -33,18 +33,20 @@ func TestContainerPsContext(t *testing.T) {
|
||||
{types.Container{Image: "ubuntu"}, true, "ubuntu", ctx.Image},
|
||||
{types.Container{Image: "verylongimagename"}, true, "verylongimagename", ctx.Image},
|
||||
{types.Container{Image: "verylongimagename"}, false, "verylongimagename", ctx.Image},
|
||||
{types.Container{
|
||||
Image: "a5a665ff33eced1e0803148700880edab4",
|
||||
ImageID: "a5a665ff33eced1e0803148700880edab4269067ed77e27737a708d0d293fbf5",
|
||||
},
|
||||
{
|
||||
types.Container{
|
||||
Image: "a5a665ff33eced1e0803148700880edab4",
|
||||
ImageID: "a5a665ff33eced1e0803148700880edab4269067ed77e27737a708d0d293fbf5",
|
||||
},
|
||||
true,
|
||||
"a5a665ff33ec",
|
||||
ctx.Image,
|
||||
},
|
||||
{types.Container{
|
||||
Image: "a5a665ff33eced1e0803148700880edab4",
|
||||
ImageID: "a5a665ff33eced1e0803148700880edab4269067ed77e27737a708d0d293fbf5",
|
||||
},
|
||||
{
|
||||
types.Container{
|
||||
Image: "a5a665ff33eced1e0803148700880edab4",
|
||||
ImageID: "a5a665ff33eced1e0803148700880edab4269067ed77e27737a708d0d293fbf5",
|
||||
},
|
||||
false,
|
||||
"a5a665ff33eced1e0803148700880edab4",
|
||||
ctx.Image,
|
||||
@ -446,7 +448,8 @@ func TestDisplayablePorts(t *testing.T) {
|
||||
Type: "tcp",
|
||||
},
|
||||
},
|
||||
"9988/tcp"},
|
||||
"9988/tcp",
|
||||
},
|
||||
{
|
||||
[]types.Port{
|
||||
{
|
||||
|
||||
@ -289,7 +289,6 @@ func (c *diskUsageImagesContext) Active() string {
|
||||
|
||||
func (c *diskUsageImagesContext) Size() string {
|
||||
return units.HumanSize(float64(c.totalSize))
|
||||
|
||||
}
|
||||
|
||||
func (c *diskUsageImagesContext) Reclaimable() string {
|
||||
@ -391,7 +390,6 @@ func (c *diskUsageVolumesContext) TotalCount() string {
|
||||
}
|
||||
|
||||
func (c *diskUsageVolumesContext) Active() string {
|
||||
|
||||
used := 0
|
||||
for _, v := range c.volumes {
|
||||
if v.UsageData.RefCount > 0 {
|
||||
|
||||
@ -19,7 +19,8 @@ func TestDiskUsageContextFormatWrite(t *testing.T) {
|
||||
Context: Context{
|
||||
Format: NewDiskUsageFormat("table", false),
|
||||
},
|
||||
Verbose: false},
|
||||
Verbose: false,
|
||||
},
|
||||
`TYPE TOTAL ACTIVE SIZE RECLAIMABLE
|
||||
Images 0 0 0B 0B
|
||||
Containers 0 0 0B 0B
|
||||
|
||||
@ -8,7 +8,7 @@ import (
|
||||
)
|
||||
|
||||
func TestEllipsis(t *testing.T) {
|
||||
var testcases = []struct {
|
||||
testcases := []struct {
|
||||
source string
|
||||
width int
|
||||
expected string
|
||||
|
||||
@ -177,7 +177,6 @@ func imageFormatTaggedAndDigest(ctx ImageContext, image types.ImageSummary) []*i
|
||||
}
|
||||
} else {
|
||||
addImage(repo, "<none>", "")
|
||||
|
||||
}
|
||||
}
|
||||
return images
|
||||
|
||||
@ -5,8 +5,7 @@ import (
|
||||
"testing"
|
||||
)
|
||||
|
||||
type dummy struct {
|
||||
}
|
||||
type dummy struct{}
|
||||
|
||||
func (d *dummy) Func1() string {
|
||||
return "Func1"
|
||||
|
||||
@ -576,7 +576,6 @@ func (b *Writer) Write(buf []byte) (n int, err error) {
|
||||
b.startEscape(ch)
|
||||
}
|
||||
}
|
||||
|
||||
} else {
|
||||
// inside escape
|
||||
if ch == b.endChar {
|
||||
|
||||
Reference in New Issue
Block a user