mirror of
https://github.com/hauler-dev/hauler.git
synced 2026-05-23 17:43:08 +00:00
* fix: move constant and flags to prevent loop * feat: add tls cert to serve * fix: add tls cli description * fix: remove unnecessary code * small updates/fixed unit test errors * fix: migrate all flags, use exported vars * fix: standardize to AddFlags --------- Signed-off-by: will <30413278+wcrum@users.noreply.github.com> Co-authored-by: Zack Brady <zackbrady123@gmail.com>
23 lines
537 B
Go
23 lines
537 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", "Output format (table, json)")
|
|
f.StringVarP(&o.TypeFilter, "type", "t", "all", "Filter on type (image, chart, file, sigs, atts, sbom)")
|
|
f.BoolVar(&o.ListRepos, "list-repos", false, "List all repository names")
|
|
|
|
// TODO: Regex/globbing
|
|
}
|