first compiling version
This commit is contained in:
parent
60fb40d61a
commit
3d54199faa
27 changed files with 908 additions and 243 deletions
|
|
@ -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
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue