_ lists
This commit is contained in:
@@ -2,6 +2,7 @@ package storage
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"gitea.inhome.blapointe.com/local/rproxy3/storage/packable"
|
||||
)
|
||||
|
||||
@@ -40,6 +41,15 @@ func (m Map) Close() error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m Map) Keys(ns string) []string {
|
||||
m2, _ := m[ns]
|
||||
result := make([]string, 0, len(m2))
|
||||
for k := range m2 {
|
||||
result = append(result, k)
|
||||
}
|
||||
return result
|
||||
}
|
||||
|
||||
func (m Map) Get(ns, key string, value packable.Packable) error {
|
||||
if _, ok := m[ns]; !ok {
|
||||
m[ns] = make(map[string][]byte)
|
||||
|
||||
Reference in New Issue
Block a user