MCPcopy Index your code
hub / github.com/git-bug/git-bug / normalizeKey

Function normalizeKey

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

Source from the content-addressed store, hash-verified

91}
92
93func normalizeKey(key string) string {
94 // this feels so wrong, but that's apparently how git behave.
95 // only section and final segment are case insensitive, subsection in between are not.
96 s := strings.Split(key, ".")
97 s[0] = strings.ToLower(s[0])
98 s[len(s)-1] = strings.ToLower(s[len(s)-1])
99 return strings.Join(s, ".")
100}

Callers 4

StoreStringMethod · 0.85
ReadAllMethod · 0.85
ReadStringMethod · 0.85
RemoveAllMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected