use any instead of interface
This commit is contained in:
parent
1d5d900f26
commit
8f350b4b02
5 changed files with 9 additions and 9 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue