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

Method WriteHelp

internal/cli/help.go:118–127  ·  view source on GitHub ↗

WriteHelp writes the help output with translated flag descriptions

()

Source from the content-addressed store, hash-verified

116
117// WriteHelp writes the help output with translated flag descriptions
118func (h *TranslatedHelpWriter) WriteHelp() {
119 fmt.Fprintf(h.writer, "%s\n", i18n.T("usage_header"))
120 fmt.Fprintf(h.writer, " %s %s\n\n", h.parser.Name, i18n.T("options_placeholder"))
121
122 fmt.Fprintf(h.writer, "%s\n", i18n.T("application_options_header"))
123 h.writeAllFlags()
124
125 fmt.Fprintf(h.writer, "\n%s\n", i18n.T("help_options_header"))
126 fmt.Fprintf(h.writer, " -h, --help %s\n", i18n.T("help_message"))
127}
128
129// getTranslatedDescription gets the translated description for a flag
130func (h *TranslatedHelpWriter) getTranslatedDescription(flagName string) string {

Callers 1

CustomHelpHandlerFunction · 0.95

Calls 2

writeAllFlagsMethod · 0.95
TFunction · 0.92

Tested by

no test coverage detected