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

Method WriteHelp

internal/cli/help.go:115–124  ·  view source on GitHub ↗

WriteHelp writes the help output with translated flag descriptions

()

Source from the content-addressed store, hash-verified

113
114// WriteHelp writes the help output with translated flag descriptions
115func (h *TranslatedHelpWriter) WriteHelp() {
116 fmt.Fprintf(h.writer, "%s\n", i18n.T("usage_header"))
117 fmt.Fprintf(h.writer, " %s %s\n\n", h.parser.Name, i18n.T("options_placeholder"))
118
119 fmt.Fprintf(h.writer, "%s\n", i18n.T("application_options_header"))
120 h.writeAllFlags()
121
122 fmt.Fprintf(h.writer, "\n%s\n", i18n.T("help_options_header"))
123 fmt.Fprintf(h.writer, " -h, --help %s\n", i18n.T("help_message"))
124}
125
126// getTranslatedDescription gets the translated description for a flag
127func (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