Files
sgard/cmd/sgard/version.go
Kyle Isom e7e353daec Add goreleaser config and version command for v0.1.0.
GoReleaser builds static binaries for linux/darwin on amd64/arm64,
injecting version via ldflags. Version command prints the embedded
version (defaults to "dev" for local builds).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-23 22:14:38 -07:00

22 lines
288 B
Go

package main
import (
"fmt"
"github.com/spf13/cobra"
)
var version = "dev"
var versionCmd = &cobra.Command{
Use: "version",
Short: "Print the version",
Run: func(cmd *cobra.Command, args []string) {
fmt.Println(version)
},
}
func init() {
rootCmd.AddCommand(versionCmd)
}