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

Function stringifyReference

pkg/cmd/root/help_reference.go:43–52  ·  view source on GitHub ↗
(cmd *cobra.Command)

Source from the content-addressed store, hash-verified

41}
42
43func stringifyReference(cmd *cobra.Command) string {
44 buf := bytes.NewBufferString("# gh reference\n\n")
45 for _, c := range cmd.Commands() {
46 if c.Hidden {
47 continue
48 }
49 cmdRef(buf, c, 2)
50 }
51 return buf.String()
52}
53
54func cmdRef(w io.Writer, cmd *cobra.Command, depth int) {
55 // Name + Description

Callers 1

NewCmdRootFunction · 0.85

Calls 2

cmdRefFunction · 0.85
StringMethod · 0.45

Tested by

no test coverage detected