mirror of
https://github.com/hauler-dev/hauler.git
synced 2026-02-14 18:09:51 +00:00
13 lines
229 B
Go
13 lines
229 B
Go
package flags
|
|
|
|
import "github.com/spf13/cobra"
|
|
|
|
type VersionOpts struct {
|
|
JSON bool
|
|
}
|
|
|
|
func (o *VersionOpts) AddFlags(cmd *cobra.Command) {
|
|
f := cmd.Flags()
|
|
f.BoolVar(&o.JSON, "json", false, "Set the output format to JSON")
|
|
}
|