CRAAPI/cmd/version.go
2024-05-10 19:48:59 +00:00

25 lines
384 B
Go

package cmd
import (
"fmt"
"github.com/spf13/cobra"
)
func versionPrint() {
fmt.Println("CRAAPI static version: v0.2")
}
var versionCmd = &cobra.Command{
Use: "version",
Short: "Print the version number of craapi",
Long: `All software has versions.`,
Run: func(cmd *cobra.Command, args []string) {
versionPrint()
},
}
func init() {
rootCmd.AddCommand(versionCmd)
}