Add documentation comments to exported symbols across all remaining smaller packages including cmd/gen-docs, context, internal/browser, internal/gh, internal/ghcmd, internal/ghinstance, internal/ghrepo, internal/keyring, internal/run, internal/safepaths, internal/tableprinter, internal/text, internal/update, pkg/cmd/accessibility, pkg/cmd/actions, pkg/cmd/alias, pkg/cmd/api, pkg/cmd/browse, pkg/cmd/cache, pkg/cmd/completion, pkg/cmd/copilot, pkg/cmd/factory, pkg/cmd/gpg-key, pkg/cmd/label, pkg/cmd/licenses, pkg/cmd/org, pkg/cmd/preview, pkg/cmd/ssh-key, pkg/cmd/version, pkg/extensions, pkg/jsoncolor, pkg/markdown, pkg/option, pkg/set, pkg/ssh, pkg/surveyext, test, internal/authflow, and utils. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
30 lines
740 B
Go
30 lines
740 B
Go
package cache
|
|
|
|
import (
|
|
"github.com/MakeNowJust/heredoc"
|
|
cmdDelete "github.com/cli/cli/v2/pkg/cmd/cache/delete"
|
|
cmdList "github.com/cli/cli/v2/pkg/cmd/cache/list"
|
|
"github.com/cli/cli/v2/pkg/cmdutil"
|
|
"github.com/spf13/cobra"
|
|
)
|
|
|
|
// NewCmdCache creates a new cobra command for the cache subcommand.
|
|
func NewCmdCache(f *cmdutil.Factory) *cobra.Command {
|
|
cmd := &cobra.Command{
|
|
Use: "cache <command>",
|
|
Short: "Manage GitHub Actions caches",
|
|
Long: "Work with GitHub Actions caches.",
|
|
Example: heredoc.Doc(`
|
|
$ gh cache list
|
|
$ gh cache delete --all
|
|
`),
|
|
GroupID: "actions",
|
|
}
|
|
|
|
cmdutil.EnableRepoOverride(cmd, f)
|
|
|
|
cmd.AddCommand(cmdList.NewCmdList(f, nil))
|
|
cmd.AddCommand(cmdDelete.NewCmdDelete(f, nil))
|
|
|
|
return cmd
|
|
}
|