diff --git a/components/engine/cli/command/formatter/container_test.go b/components/engine/cli/command/formatter/container_test.go index cdfc911a94..16137897b9 100644 --- a/components/engine/cli/command/formatter/container_test.go +++ b/components/engine/cli/command/formatter/container_test.go @@ -372,7 +372,7 @@ func TestContainerContextWriteJSONField(t *testing.T) { } func TestContainerBackCompat(t *testing.T) { - containers := []types.Container{types.Container{ID: "brewhaha"}} + containers := []types.Container{{ID: "brewhaha"}} cases := []string{ "ID", "Names", @@ -390,7 +390,7 @@ func TestContainerBackCompat(t *testing.T) { for _, c := range cases { ctx := Context{Format: Format(fmt.Sprintf("{{ .%s }}", c)), Output: buf} if err := ContainerWrite(ctx, containers); err != nil { - t.Log("could not render template for field '%s': %v", c, err) + t.Logf("could not render template for field '%s': %v", c, err) t.Fail() } buf.Reset() diff --git a/components/engine/cli/command/stack/list.go b/components/engine/cli/command/stack/list.go index 7be42525dd..f655b929ad 100644 --- a/components/engine/cli/command/stack/list.go +++ b/components/engine/cli/command/stack/list.go @@ -72,7 +72,7 @@ func printTable(out io.Writer, stacks []*stack) { type stack struct { // Name is the name of the stack - Name string + Name string // Services is the number of the services Services int } diff --git a/components/engine/daemon/commit.go b/components/engine/daemon/commit.go index d0de6c0981..ae6f51be3c 100644 --- a/components/engine/daemon/commit.go +++ b/components/engine/daemon/commit.go @@ -240,8 +240,8 @@ func (daemon *Daemon) Commit(name string, c *backend.ContainerCommitConfig) (str } attributes := map[string]string{ - "comment": c.Comment, - "imageID": id.String(), + "comment": c.Comment, + "imageID": id.String(), "imageRef": imageRef, } daemon.LogContainerEventWithAttributes(container, "commit", attributes) diff --git a/components/engine/volume/volume_test.go b/components/engine/volume/volume_test.go index 25e384ac6c..54df38053f 100644 --- a/components/engine/volume/volume_test.go +++ b/components/engine/volume/volume_test.go @@ -254,7 +254,7 @@ func TestParseMountSpec(t *testing.T) { t.Fatalf("Expected mount source to match. Expected: '%s', Actual: '%s'", c.expected.Source, mp.Source) } if c.expected.RW != mp.RW { - t.Fatalf("Expected mount writable to match. Expected: '%v', Actual: '%s'", c.expected.RW, mp.RW) + t.Fatalf("Expected mount writable to match. Expected: '%v', Actual: '%v'", c.expected.RW, mp.RW) } if c.expected.Propagation != mp.Propagation { t.Fatalf("Expected mount propagation to match. Expected: '%v', Actual: '%s'", c.expected.Propagation, mp.Propagation)