diff options
author | Jakob Borg <jakob@kastelo.net> | 2019-02-02 12:16:27 +0100 |
---|---|---|
committer | Jakob Borg <jakob@kastelo.net> | 2019-02-02 12:16:27 +0100 |
commit | c2ddc835095d9d82a79524bfd80a104db98b61f6 (patch) | |
tree | d36c5755cf5b78ee4db82f21db5f833719a0101d /lib/db/namespaced.go | |
parent | 9fd270d78ec6e9d815cecff6264b508651176f38 (diff) |
all: Revert the underscore sillyness
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 cf44a95008..fd6432726e 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 { |