Files
hauler/internal/flags/version.go
2024-12-04 14:29:51 -05:00

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")
}