Clean up pkg/api.

These are based on recommendation from
[staticcheck](http://staticcheck.io/).
This commit is contained in:
Àbéjídé Àyodélé
2019-05-09 15:23:41 +00:00
parent 524169fe1c
commit 04be2c4162
5 changed files with 7 additions and 8 deletions

View File

@@ -69,7 +69,7 @@ func doDeepCopyTest(t *testing.T, kind schema.GroupVersionKind, f *fuzz.Fuzzer)
return
}
if bytes.Compare(prefuzzData.Bytes(), postfuzzData.Bytes()) != 0 {
if !bytes.Equal(prefuzzData.Bytes(), postfuzzData.Bytes()) {
t.Log(diff.StringDiff(prefuzzData.String(), postfuzzData.String()))
t.Errorf("Fuzzing copy modified original of %#v", kind)
return

View File

@@ -387,7 +387,7 @@ func TestObjectWatchFraming(t *testing.T) {
}
sr = streaming.NewDecoder(framer.NewFrameReader(ioutil.NopCloser(out)), s)
outEvent := &metav1.WatchEvent{}
res, _, err = sr.Decode(nil, outEvent)
_, _, err = sr.Decode(nil, outEvent)
if err != nil || outEvent.Type != string(watch.Added) {
t.Fatalf("%v: %#v", err, outEvent)
}