mirror of
https://github.com/hauler-dev/hauler.git
synced 2026-05-19 07:37:25 +00:00
* initial desc formatting/updates * fixed typos * updated commands base on feedback * more updates based on feedback --------- Signed-off-by: Zack Brady <zackbrady123@gmail.com>
21 lines
570 B
Go
21 lines
570 B
Go
package flags
|
|
|
|
import "github.com/spf13/cobra"
|
|
|
|
type InfoOpts struct {
|
|
*StoreRootOpts
|
|
|
|
OutputFormat string
|
|
TypeFilter string
|
|
SizeUnit string
|
|
ListRepos bool
|
|
}
|
|
|
|
func (o *InfoOpts) AddFlags(cmd *cobra.Command) {
|
|
f := cmd.Flags()
|
|
|
|
f.StringVarP(&o.OutputFormat, "output", "o", "table", "(Optional) Specify the output format (table | json)")
|
|
f.StringVarP(&o.TypeFilter, "type", "t", "all", "(Optional) Filter on content type (image | chart | file | sigs | atts | sbom)")
|
|
f.BoolVar(&o.ListRepos, "list-repos", false, "(Optional) List all repository names")
|
|
}
|