magellan/cmd/version.go

18 lines
327 B
Go

package cmd
import (
"github.com/davidallendj/magellan/internal/version"
"github.com/spf13/cobra"
)
var VersionCmd = &cobra.Command{
Use: "version",
Short: "Print version info and exit",
Run: func(cmd *cobra.Command, args []string) {
version.PrintVersionInfo()
},
}
func init() {
rootCmd.AddCommand(VersionCmd)
}