store/memory: fixup
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
parent
1e43122660
commit
f54658830d
@ -77,12 +77,10 @@ func (m *memoryStore) list(prefix string, limit, offset uint) []string {
|
||||
if !strings.HasPrefix(k, prefix) {
|
||||
continue
|
||||
}
|
||||
if prefix == "" {
|
||||
allKeys[i] = strings.TrimPrefix(k, "/")
|
||||
} else {
|
||||
allKeys[i] = strings.TrimPrefix(k, prefix)
|
||||
allKeys[i] = strings.TrimPrefix(k, prefix)
|
||||
if allKeys[i][0] == '/' {
|
||||
allKeys[i] = allKeys[i][1:]
|
||||
}
|
||||
allKeys[i] = strings.TrimPrefix(allKeys[i], "/")
|
||||
i++
|
||||
}
|
||||
if limit != 0 || offset != 0 {
|
||||
|
Loading…
Reference in New Issue
Block a user