implemented api handlers
This commit is contained in:
parent
ab12dd67d4
commit
372915e24d
15 changed files with 302 additions and 73 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue