1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

Merge pull request #28538 from yongtang/11162016-Log-Logf-fix

Fix several issues with `go vet` and `gofmt -s`
This commit is contained in:
Brian Goff 2016-11-17 15:21:22 -05:00 committed by GitHub
commit 22dccaf2d6
4 changed files with 6 additions and 6 deletions

View file

@ -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()

View file

@ -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)