mirror of
https://github.com/anchore/syft.git
synced 2026-10-30 14:02:26 +01:00
18 lines
384 B
Go
18 lines
384 B
Go
package options
|
|
|
|
import (
|
|
"github.com/spf13/cobra"
|
|
"github.com/spf13/viper"
|
|
)
|
|
|
|
type VersionOptions struct {
|
|
Output string
|
|
}
|
|
|
|
var _ Interface = (*PackagesOptions)(nil)
|
|
|
|
func (o *VersionOptions) AddFlags(cmd *cobra.Command, v *viper.Viper) error {
|
|
cmd.Flags().StringVarP(&o.Output, "output", "o", "text", "format to show version information (available=[text, json])")
|
|
return nil
|
|
}
|