cli/pkg/cmd/search/search.go
2022-05-12 08:48:22 +00:00

24 lines
658 B
Go

package search
import (
"github.com/cli/cli/v2/pkg/cmdutil"
"github.com/spf13/cobra"
searchIssuesCmd "github.com/cli/cli/v2/pkg/cmd/search/issues"
searchPrsCmd "github.com/cli/cli/v2/pkg/cmd/search/prs"
searchReposCmd "github.com/cli/cli/v2/pkg/cmd/search/repos"
)
func NewCmdSearch(f *cmdutil.Factory) *cobra.Command {
cmd := &cobra.Command{
Use: "search <command>",
Short: "Search for repositories, issues, and pull requests",
Long: "Search across all of GitHub.",
}
cmd.AddCommand(searchIssuesCmd.NewCmdIssues(f, nil))
cmd.AddCommand(searchPrsCmd.NewCmdPrs(f, nil))
cmd.AddCommand(searchReposCmd.NewCmdRepos(f, nil))
return cmd
}