implemented api handlers

This commit is contained in:
ston1th 2021-04-08 00:34:54 +02:00
commit 372915e24d
15 changed files with 302 additions and 73 deletions

View file

@ -33,7 +33,8 @@ func (kv *kv) GetPrefix(pk string) (m map[string][]byte, err error) {
m = make(map[string][]byte)
for k, v := range kv.m {
if strings.HasPrefix(k, pk) {
m[k] = v
key := strings.TrimPrefix(k, pk)
m[key] = v
}
}
if len(m) == 0 {