MCPcopy Index your code
hub / github.com/cli/cli / helpTopicHelpFunc

Function helpTopicHelpFunc

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

Source from the content-addressed store, hash-verified

347}
348
349func helpTopicHelpFunc(w io.Writer, command *cobra.Command) {
350 fmt.Fprint(w, command.Long)
351 if command.Example != "" {
352 fmt.Fprintf(w, "\n\nEXAMPLES\n")
353 fmt.Fprint(w, text.Indent(command.Example, " "))
354 }
355}
356
357func helpTopicUsageFunc(w io.Writer, command *cobra.Command) error {
358 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