MCPcopy Index your code
hub / github.com/cortexproject/cortex / removeFlagPrefix

Function removeFlagPrefix

tools/doc-generator/main.go:211–225  ·  view source on GitHub ↗
(block *configBlock, prefix string)

Source from the content-addressed store, hash-verified

209)
210
211func removeFlagPrefix(block *configBlock, prefix string) {
212 for _, entry := range block.entries {
213 switch entry.kind {
214 case "block":
215 // Skip root blocks
216 if !entry.root {
217 removeFlagPrefix(entry.block, prefix)
218 }
219 case "field":
220 if strings.HasPrefix(entry.fieldFlag, prefix) {
221 entry.fieldFlag = "<prefix>" + entry.fieldFlag[len(prefix):]
222 }
223 }
224 }
225}
226
227func annotateFlagPrefix(blocks []*configBlock) {
228 // Find duplicated blocks

Callers 1

annotateFlagPrefixFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected