mirror of
https://github.com/linka-cloud/d2vm.git
synced 2024-06-28 09:29:51 +00:00
24 lines
306 B
Go
24 lines
306 B
Go
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)
|
|
}
|