MCPcopy Create free account
hub / github.com/cli/cli / helpTopicHelpFunc

Function helpTopicHelpFunc

pkg/cmd/root/help_topic.go:354–360  ·  view source on GitHub ↗
(w io.Writer, command *cobra.Command)

Source from the content-addressed store, hash-verified

352}
353
354func helpTopicHelpFunc(w io.Writer, command *cobra.Command) {
355 fmt.Fprint(w, command.Long)
356 if command.Example != "" {
357 fmt.Fprintf(w, "\n\nEXAMPLES\n")
358 fmt.Fprint(w, text.Indent(command.Example, " "))
359 }
360}
361
362func helpTopicUsageFunc(w io.Writer, command *cobra.Command) error {
363 fmt.Fprintf(w, "Usage: gh help %s", command.Use)

Callers 1

NewCmdHelpTopicFunction · 0.85

Calls 1

IndentFunction · 0.92

Tested by

no test coverage detected