yoake/internal/db/error.go

15 lines
180 B
Go
Raw Normal View History

2022-11-11 16:15:22 -06:00
package db
import (
"errors"
"github.com/dgraph-io/badger/v3"
)
func IsNotFound(err error) bool {
if errors.Is(err, badger.ErrKeyNotFound) {
return true
}
return false
}