Fixing several (but not all) go vet errors. Most are around string formatting, or unreachable code.

This commit is contained in:
goltermann
2016-03-22 17:26:50 -07:00
parent 1f8773ee45
commit 34d4eaea08
42 changed files with 68 additions and 72 deletions

View File

@@ -239,7 +239,7 @@ func TestSortMergeLists(t *testing.T) {
original := testObjectToJSONOrFail(t, c.Original, c.Description)
sorted := testObjectToJSONOrFail(t, c.Sorted, c.Description)
if !reflect.DeepEqual(original, sorted) {
t.Errorf("error in test case: %s\ncannot sort object:\n%s\n%sexpected:\n%s\ngot:\n%s\n",
t.Errorf("error in test case: %s\ncannot sort object:\n%s\nexpected:\n%s\ngot:\n%s\n",
c.Description, toYAMLOrError(c.Original), toYAMLOrError(c.Sorted), jsonToYAMLOrError(original))
}
}
@@ -1814,7 +1814,7 @@ func testTwoWayPatch(t *testing.T, c StrategicMergePatchTestCase) {
actual, err := CreateTwoWayMergePatch(original, modified, mergeItem)
if err != nil {
t.Errorf("error: %s\nin test case: %s\ncannot create two way patch: %s:\n%s\n",
err, c.Description, toYAMLOrError(c.StrategicMergePatchTestCaseData))
err, c.Description, original, toYAMLOrError(c.StrategicMergePatchTestCaseData))
return
}