diff options
author | Jakob Borg <jakob@kastelo.net> | 2019-02-02 11:02:28 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-02-02 11:02:28 +0100 |
commit | df5c1eaf019da376c8418401eff66ce5209a4769 (patch) | |
tree | a9906e318992e822209b612788bb52b1d1438fa6 /lib/db/namespaced.go | |
parent | 2111386ee46237e52bb880d547e24ea759b1c344 (diff) |
all: Bunch of more linter fixes (#5500)
Diffstat (limited to 'lib/db/namespaced.go')
-rw-r--r-- | lib/db/namespaced.go | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/db/namespaced.go b/lib/db/namespaced.go index fd6432726e..cf44a95008 100644 --- a/lib/db/namespaced.go +++ b/lib/db/namespaced.go @@ -61,7 +61,7 @@ func (n *NamespacedKV) Reset() { func (n *NamespacedKV) PutInt64(key string, val int64) { var valBs [8]byte binary.BigEndian.PutUint64(valBs[:], uint64(val)) - n.db.Put(n.prefixedKey(key), valBs[:], nil) + _ = n.db.Put(n.prefixedKey(key), valBs[:], nil) } // Int64 returns the stored value interpreted as an int64 and a boolean that @@ -79,7 +79,7 @@ func (n *NamespacedKV) Int64(key string) (int64, bool) { // type) is overwritten. func (n *NamespacedKV) PutTime(key string, val time.Time) { valBs, _ := val.MarshalBinary() // never returns an error - n.db.Put(n.prefixedKey(key), valBs, nil) + _ = n.db.Put(n.prefixedKey(key), valBs, nil) } // Time returns the stored value interpreted as a time.Time and a boolean @@ -97,7 +97,7 @@ func (n NamespacedKV) Time(key string) (time.Time, bool) { // PutString stores a new string. Any existing value (even if of another type) // is overwritten. func (n *NamespacedKV) PutString(key, val string) { - n.db.Put(n.prefixedKey(key), []byte(val), nil) + _ = n.db.Put(n.prefixedKey(key), []byte(val), nil) } // String returns the stored value interpreted as a string and a boolean that @@ -113,7 +113,7 @@ func (n NamespacedKV) String(key string) (string, bool) { // PutBytes stores a new byte slice. Any existing value (even if of another type) // is overwritten. func (n *NamespacedKV) PutBytes(key string, val []byte) { - n.db.Put(n.prefixedKey(key), val, nil) + _ = n.db.Put(n.prefixedKey(key), val, nil) } // Bytes returns the stored value as a raw byte slice and a boolean that @@ -130,9 +130,9 @@ func (n NamespacedKV) Bytes(key string) ([]byte, bool) { // is overwritten. func (n *NamespacedKV) PutBool(key string, val bool) { if val { - n.db.Put(n.prefixedKey(key), []byte{0x0}, nil) + _ = n.db.Put(n.prefixedKey(key), []byte{0x0}, nil) } else { - n.db.Put(n.prefixedKey(key), []byte{0x1}, nil) + _ = n.db.Put(n.prefixedKey(key), []byte{0x1}, nil) } } @@ -149,7 +149,7 @@ func (n NamespacedKV) Bool(key string) (bool, bool) { // Delete deletes the specified key. It is allowed to delete a nonexistent // key. func (n NamespacedKV) Delete(key string) { - n.db.Delete(n.prefixedKey(key), nil) + _ = n.db.Delete(n.prefixedKey(key), nil) } func (n NamespacedKV) prefixedKey(key string) []byte { |