MCPcopy Create free account
hub / github.com/git-bug/git-bug / ReadAll

Method ReadAll

repository/config_mem.go:35–44  ·  view source on GitHub ↗
(keyPrefix string)

Source from the content-addressed store, hash-verified

33}
34
35func (mc *MemConfig) ReadAll(keyPrefix string) (map[string]string, error) {
36 keyPrefix = normalizeKey(keyPrefix)
37 result := make(map[string]string)
38 for key, val := range mc.config {
39 if strings.HasPrefix(key, keyPrefix) {
40 result[key] = val
41 }
42 }
43 return result, nil
44}
45
46func (mc *MemConfig) ReadString(key string) (string, error) {
47 // unlike git, the mock can only store one value for the same key

Callers

nothing calls this directly

Calls 2

normalizeKeyFunction · 0.85
HasPrefixMethod · 0.45

Tested by

no test coverage detected