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

Function AddGroup

pkg/cmdutil/cmdgroup.go:5–15  ·  view source on GitHub ↗
(parent *cobra.Command, title string, cmds ...*cobra.Command)

Source from the content-addressed store, hash-verified

3import "github.com/spf13/cobra"
4
5func AddGroup(parent *cobra.Command, title string, cmds ...*cobra.Command) {
6 g := &cobra.Group{
7 Title: title,
8 ID: title,
9 }
10 parent.AddGroup(g)
11 for _, c := range cmds {
12 c.GroupID = g.ID
13 parent.AddCommand(c)
14 }
15}

Callers 6

NewCmdDiscussionFunction · 0.92
NewCmdReleaseFunction · 0.92
NewCmdOrgFunction · 0.92
NewCmdIssueFunction · 0.92
NewCmdRepoFunction · 0.92
NewCmdPRFunction · 0.92

Calls

no outgoing calls

Tested by

no test coverage detected