Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

crane: add catalog argument use annotation #1473

Merged
merged 5 commits into from Nov 3, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion cmd/crane/cmd/catalog.go
Expand Up @@ -24,7 +24,7 @@ import (
// NewCmdCatalog creates a new cobra.Command for the repos subcommand.
func NewCmdCatalog(options *[]crane.Option) *cobra.Command {
return &cobra.Command{
Use: "catalog",
Use: "catalog {REGISTRY}",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Use: "catalog {REGISTRY}",
Use: "catalog [REGISTRY]",

Yeah let's use the same form we use elsewhere.

It might also help to add a usage section with some examples, so folks know what kinds of values to expect [REGISTRY] to mean.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated to square brackets & included a standard example using some existing patterns.

crane catalog --help
List the repos in a registry

Usage:
  crane catalog [REGISTRY] [flags]

Examples:
  # list the repos for reg.example.com
  $ echo "reg.example.com" | crane catalog
  # or
  $ crane catalog reg.example.com

Flags:
  -h, --help   help for catalog

Global Flags:
      --allow-nondistributable-artifacts   Allow pushing non-distributable (foreign) layers
      --insecure                           Allow image references to be fetched without TLS
      --platform platform                  Specifies the platform in the form os/arch[/variant][:osversion] (e.g. linux/amd64). (default all)
  -v, --verbose                            Enable debug logs

Short: "List the repos in a registry",
Args: cobra.ExactArgs(1),
RunE: func(_ *cobra.Command, args []string) error {
Expand Down