CustomHelpHandler handles help output with translations
(parser *flags.Parser, writer io.Writer)
| 169 | |
| 170 | // CustomHelpHandler handles help output with translations |
| 171 | func 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. |
| 179 | func ensureI18nInitialized() { |
no test coverage detected