Print/log pointers of structs with %#v instead of %+v

There are many places in k8s where %+v is used to format a pointer
to struct, which isn't working as expected.

Fixes #26591
This commit is contained in:
Michal Rostecki
2016-06-14 14:04:38 +02:00
parent ed763b8034
commit 59ca5986dd
35 changed files with 102 additions and 102 deletions

View File

@@ -368,9 +368,9 @@ func TestToString(t *testing.T) {
}
for _, ts := range toStringTests {
if out := ts.In.String(); out == "" && ts.Valid {
t.Errorf("%+v.String() => '%v' expected no error", ts.In, out)
t.Errorf("%#v.String() => '%v' expected no error", ts.In, out)
} else if out != ts.Out {
t.Errorf("%+v.String() => '%v' want '%v'", ts.In, out, ts.Out)
t.Errorf("%#v.String() => '%v' want '%v'", ts.In, out, ts.Out)
}
}
}