Skip to content

Commit

Permalink
Fix db_test.go to use bytes.Equal instead of bytes.Compare per linter.
Browse files Browse the repository at this point in the history
  • Loading branch information
jpbetz committed Sep 14, 2017
1 parent fefb4a0 commit 8f03d2b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion db_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -450,7 +450,7 @@ func TestDB_Open_ReadOnly(t *testing.T) {
// Read from a read-only transaction.
if err := readOnlyDB.View(func(tx *bolt.Tx) error {
value := tx.Bucket([]byte("widgets")).Get([]byte("foo"))
if bytes.Compare(value, []byte("bar")) != 0 {
if !bytes.Equal(value, []byte("bar")) {
t.Fatal("expect value 'bar', got", value)
}
return nil
Expand Down

0 comments on commit 8f03d2b

Please sign in to comment.