2
0
mirror of https://github.com/linka-cloud/d2vm.git synced 2024-06-23 15:19:52 +00:00
d2vm/cmd/d2vm/version.go

24 lines
306 B
Go
Raw Normal View History

package main
import (
"fmt"
"github.com/spf13/cobra"
"go.linka.cloud/d2vm"
)
var (
cmdVersion = &cobra.Command{
Use: "version",
Run: func(cmd *cobra.Command, args []string) {
fmt.Println(d2vm.Version)
fmt.Println(d2vm.BuildDate)
},
}
)
func init() {
rootCmd.AddCommand(cmdVersion)
}