roulette/cmd/version.go

27 lines
404 B
Go
Raw Normal View History

2022-09-08 15:12:06 +00:00
/*
Copyright © 2022 Seednode <seednode@seedno.de>
*/
package cmd
import (
"fmt"
"github.com/spf13/cobra"
)
var Version = "0.17.1"
2022-09-08 15:12:06 +00:00
func init() {
rootCmd.AddCommand(versionCmd)
}
var versionCmd = &cobra.Command{
Use: "version",
Short: "Print version",
Long: "Print the version number of roulette",
Run: func(cmd *cobra.Command, args []string) {
fmt.Println("roulette v" + Version)
},
}