mirror of
https://github.com/nbd-wtf/go-nostr.git
synced 2025-08-27 14:22:20 +02:00
feat(nip11): update to nips pr nostr-protocol/nip#1821
This commit is contained in:
@@ -4,13 +4,13 @@ package kvstore
|
||||
type KVStore interface {
|
||||
// Get retrieves a value for a given key. Returns nil if not found.
|
||||
Get(key []byte) ([]byte, error)
|
||||
|
||||
|
||||
// Set stores a value for a given key
|
||||
Set(key []byte, value []byte) error
|
||||
|
||||
|
||||
// Delete removes a key and its value
|
||||
Delete(key []byte) error
|
||||
|
||||
|
||||
// Close releases any resources held by the store
|
||||
Close() error
|
||||
|
||||
|
@@ -16,7 +16,7 @@ type Store struct {
|
||||
|
||||
func NewStore(path string) (*Store, error) {
|
||||
// create directory if it doesn't exist
|
||||
if err := os.MkdirAll(path, 0755); err != nil {
|
||||
if err := os.MkdirAll(path, 0o755); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
@@ -31,7 +31,7 @@ func NewStore(path string) (*Store, error) {
|
||||
env.SetMapSize(1 << 30) // 1GB
|
||||
|
||||
// open the environment
|
||||
if err := env.Open(path, lmdb.NoTLS|lmdb.WriteMap, 0644); err != nil {
|
||||
if err := env.Open(path, lmdb.NoTLS|lmdb.WriteMap, 0o644); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user