first compiling version

This commit is contained in:
ston1th 2023-03-15 01:51:45 +01:00
commit 3d54199faa
27 changed files with 908 additions and 243 deletions

View file

@ -3,9 +3,7 @@
package db
import (
"sort"
"git.giftfish.de/ston1th/goacc/pkg/core"
"git.giftfish.de/ston1th/keyctl/pkg/core"
"git.giftfish.de/ston1th/keyctl/pkg/key"
)
@ -13,13 +11,12 @@ const keyPrefix = "key/"
func (db *DB) GetKeys() (keys core.Keys, err error) {
err = db.store.ForEachPrefix(keyPrefix, func(k string, _ []byte) error {
k, err := db.GetKey(k)
key, err := db.GetKey(k)
if err == nil {
keys = append(keys, k)
keys = append(keys, key)
}
return nil
})
sort.Sort(keys)
return
}