agecem-org/cmd/version.go

22 lines
400 B
Go
Raw Normal View History

package cmd
import (
"fmt"
"git.agecem.com/agecem/agecem-org/version"
"github.com/spf13/cobra"
)
// versionCmd represents the version command
var versionCmd = &cobra.Command{
Use: "version",
Short: "Print version registered at build time",
Run: func(cmd *cobra.Command, args []string) {
fmt.Println("agecem-org", version.Version())
},
}
func init() {
rootCmd.AddCommand(versionCmd)
}