Files
kmsvc-cli/internal/cli/version.go
T
rock 0009b1f24d
ci / test (push) Failing after 1m1s
fix: format code with gofmt
2026-08-30 07:28:02 -07:00

24 lines
460 B
Go

package cli
import (
"fmt"
"github.com/spf13/cobra"
)
// version is injected at release build time via:
//
// -ldflags "-X forgejo.riotpiao.com/rock/kmsvc-cli/internal/cli.version=v1.2.3"
var version = "dev"
func newVersionCmd() *cobra.Command {
return &cobra.Command{
Use: "version",
Short: "Print the kmsvc CLI version",
RunE: func(cmd *cobra.Command, args []string) error {
fmt.Fprintln(cmd.OutOrStdout(), version)
return nil
},
}
}