github.com/kastenhq/syft@v0.0.0-20230821225854-0710af25cdbe/cmd/syft/cli/options/version.go (about) 1 package options 2 3 import ( 4 "github.com/spf13/cobra" 5 "github.com/spf13/viper" 6 ) 7 8 type VersionOptions struct { 9 Output string 10 } 11 12 var _ Interface = (*VersionOptions)(nil) 13 14 func (o *VersionOptions) AddFlags(cmd *cobra.Command, _ *viper.Viper) error { 15 cmd.Flags().StringVarP(&o.Output, "output", "o", "text", "format to show version information (available=[text, json])") 16 return nil 17 }