25 lines
384 B
Go
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)
|
|
}
|