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

Method ReadString

repository/config_mem.go:46–55  ·  view source on GitHub ↗
(key string)

Source from the content-addressed store, hash-verified

44}
45
46func (mc *MemConfig) ReadString(key string) (string, error) {
47 // unlike git, the mock can only store one value for the same key
48 key = normalizeKey(key)
49 val, ok := mc.config[key]
50 if !ok {
51 return "", newErrNoConfigEntry(key)
52 }
53
54 return val, nil
55}
56
57func (mc *MemConfig) ReadBool(key string) (bool, error) {
58 // unlike git, the mock can only store one value for the same key

Callers 2

ReadBoolMethod · 0.95
ReadTimestampMethod · 0.95

Calls 2

normalizeKeyFunction · 0.85
newErrNoConfigEntryFunction · 0.85

Tested by

no test coverage detected