MCPcopy Create free account
hub / github.com/danielmiessler/Fabric / CustomHelpHandler

Function CustomHelpHandler

internal/cli/help.go:171–176  ·  view source on GitHub ↗

CustomHelpHandler handles help output with translations

(parser *flags.Parser, writer io.Writer)

Source from the content-addressed store, hash-verified

169
170// CustomHelpHandler handles help output with translations
171func CustomHelpHandler(parser *flags.Parser, writer io.Writer) {
172 ensureI18nInitialized()
173
174 helpWriter := NewTranslatedHelpWriter(parser, writer)
175 helpWriter.WriteHelp()
176}
177
178// ensureI18nInitialized initializes i18n before Cli runs, because help output happens during flag parsing.
179func ensureI18nInitialized() {

Callers 1

InitFunction · 0.85

Calls 3

WriteHelpMethod · 0.95
ensureI18nInitializedFunction · 0.85
NewTranslatedHelpWriterFunction · 0.85

Tested by

no test coverage detected