Files
kontor/kontor-gin/internal/cmd/version.go
T
tpeetz 8ef3e201d6
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 5s
Gitea Actions Demo / build-and-test (push) Failing after 12m31s
add version information
2026-10-24 02:08:56 +02:00

31 lines
488 B
Go

package cmd
import (
"fmt"
"log/slog"
"github.com/spf13/cobra"
)
var (
version = "unset"
commit = "unset"
date = "unset"
)
var versionCmd = &cobra.Command{
Use: "version",
Short: "Show Kontor Version",
Long: "Show Kontor Version",
Run: func(cmd *cobra.Command, args []string) {
slog.Info("version kontor")
fmt.Println("Version: ", version)
fmt.Println("Version: ", commit)
fmt.Println("Version: ", date)
},
}
func init() {
rootCmd.AddCommand(versionCmd)
}