mirror of
https://github.com/LBRYFoundation/lbcwallet.git
synced 2025-08-23 17:47:29 +00:00
i'm still laughing at how idiotic golint is about this
This commit is contained in:
parent
e344c374e1
commit
4e58d61556
1 changed files with 5 additions and 5 deletions
|
@ -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 {
|
||||||
|
|
Loading…
Add table
Reference in a new issue