contentserver/cmd/version.go
2024-03-21 16:03:21 +01:00

23 lines
338 B
Go

package cmd
import (
"fmt"
"github.com/spf13/cobra"
)
// Populated by goreleaser during build
var version = "latest"
var versionCmd = &cobra.Command{
Use: "version",
Short: "Print version information",
Run: func(cmd *cobra.Command, args []string) {
fmt.Println(version)
},
}
func init() {
rootCmd.AddCommand(versionCmd)
}