use any instead of interface

This commit is contained in:
ston1th 2023-03-21 01:30:56 +01:00
commit 8f350b4b02
5 changed files with 9 additions and 9 deletions

View file

@ -85,7 +85,7 @@ func (bs *BoltStore) Restore(r io.Reader) (err error) {
})
}
func (bs *BoltStore) Get(key string, v interface{}) (err error) {
func (bs *BoltStore) Get(key string, v any) (err error) {
err = bs.db.View(func(tx *bolt.Tx) error {
b := tx.Bucket([]byte(defaultBoltBucket)).Get([]byte(key))
if b == nil {
@ -99,7 +99,7 @@ func (bs *BoltStore) Get(key string, v interface{}) (err error) {
return
}
func (bs *BoltStore) Set(key string, v interface{}) error {
func (bs *BoltStore) Set(key string, v any) error {
return bs.db.Update(func(tx *bolt.Tx) (err error) {
var b []byte
if v != nil {