package commands import ( "context" "os" "github.com/peterbourgon/ff/v3/ffcli" "edge-infra.dev/pkg/lib/cli" "edge-infra.dev/pkg/lib/runtime/version" ) // Subcommand returns an ffcli compatible Command that can be // registered as a Subcommand on CLIs func Version() *ffcli.Command { h := "Print version information" cmd := &ffcli.Command{ Name: "version", ShortHelp: h, LongHelp: h, Exec: func(_ context.Context, _ []string) error { cli.Version(os.Stdout, version.New()) return nil }, } return cmd }