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

Method WriteHelp

internal/cli/help.go:130–139  ·  view source on GitHub ↗

WriteHelp writes the help output with translated flag descriptions

()

Source from the content-addressed store, hash-verified

128
129// WriteHelp writes the help output with translated flag descriptions
130func (h *TranslatedHelpWriter) WriteHelp() {
131 fmt.Fprintf(h.writer, "%s\n", i18n.T("usage_header"))
132 fmt.Fprintf(h.writer, " %s %s\n\n", h.parser.Name, i18n.T("options_placeholder"))
133
134 fmt.Fprintf(h.writer, "%s\n", i18n.T("application_options_header"))
135 h.writeAllFlags()
136
137 fmt.Fprintf(h.writer, "\n%s\n", i18n.T("help_options_header"))
138 fmt.Fprintf(h.writer, " -h, --help %s\n", i18n.T("help_message"))
139}
140
141func (h *TranslatedHelpWriter) getTranslatedDescription(flagName string) string {
142 if i18nKey, exists := flagDescriptionMap[flagName]; exists {

Callers 1

CustomHelpHandlerFunction · 0.95

Calls 2

writeAllFlagsMethod · 0.95
TFunction · 0.92

Tested by

no test coverage detected