MCPcopy
hub / github.com/cli/cli / manPrintOptions

Function manPrintOptions

internal/docs/man.go:167–180  ·  view source on GitHub ↗
(buf *bytes.Buffer, command *cobra.Command)

Source from the content-addressed store, hash-verified

165}
166
167func manPrintOptions(buf *bytes.Buffer, command *cobra.Command) {
168 flags := command.NonInheritedFlags()
169 if flags.HasAvailableFlags() {
170 buf.WriteString("# OPTIONS\n")
171 manPrintFlags(buf, flags)
172 buf.WriteString("\n")
173 }
174 flags = command.InheritedFlags()
175 if hasNonHelpFlags(flags) {
176 buf.WriteString("# OPTIONS INHERITED FROM PARENT COMMANDS\n")
177 manPrintFlags(buf, flags)
178 buf.WriteString("\n")
179 }
180}
181
182func manPrintAliases(buf *bytes.Buffer, command *cobra.Command) {
183 if len(command.Aliases) > 0 {

Callers 1

genManFunction · 0.85

Calls 2

manPrintFlagsFunction · 0.85
hasNonHelpFlagsFunction · 0.85

Tested by

no test coverage detected