i'm still laughing at how idiotic golint is about this

This commit is contained in:
Josh Rickmar 2017-01-19 20:13:58 -05:00 committed by Olaoluwa Osuntokun
parent e344c374e1
commit 4e58d61556

View file

@ -126,20 +126,20 @@ func testReadWriteBucketInterface(tc *testContext, bucket walletdb.ReadWriteBuck
// stored values are the expected values. // stored values are the expected values.
keysFound := make(map[string]struct{}, len(keyValues)) keysFound := make(map[string]struct{}, len(keyValues))
err := bucket.ForEach(func(k, v []byte) error { err := bucket.ForEach(func(k, v []byte) error {
kString := string(k) ks := string(k)
wantV, ok := keyValues[kString] wantV, ok := keyValues[ks]
if !ok { if !ok {
return fmt.Errorf("ForEach: key '%s' should "+ return fmt.Errorf("ForEach: key '%s' should "+
"exist", kString) "exist", ks)
} }
if !reflect.DeepEqual(v, []byte(wantV)) { if !reflect.DeepEqual(v, []byte(wantV)) {
return fmt.Errorf("ForEach: value for key '%s' "+ return fmt.Errorf("ForEach: value for key '%s' "+
"does not match - got %s, want %s", "does not match - got %s, want %s",
kString, v, wantV) ks, v, wantV)
} }
keysFound[kString] = struct{}{} keysFound[ks] = struct{}{}
return nil return nil
}) })
if err != nil { if err != nil {