From 2e9520db8927287d4d0b8e6af5dd5eb172aeb481 Mon Sep 17 00:00:00 2001 From: ErickSkrauch Date: Mon, 11 Sep 2017 14:16:25 +0300 Subject: [PATCH] =?UTF-8?q?=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=BB=D0=B5?= =?UTF-8?q?=D0=BD=D0=B0=20=D0=BA=D0=BE=D0=BC=D0=B0=D0=BD=D0=B4=D0=B0=20ver?= =?UTF-8?q?sion=20=D0=B4=D0=BB=D1=8F=20=D0=BE=D1=82=D0=BE=D0=B1=D1=80?= =?UTF-8?q?=D0=B0=D0=B6=D0=B5=D0=BD=D0=B8=D1=8F=20=D0=B2=D0=B5=D1=80=D1=81?= =?UTF-8?q?=D0=B8=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cmd/version.go | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 cmd/version.go diff --git a/cmd/version.go b/cmd/version.go new file mode 100644 index 0000000..cd08f82 --- /dev/null +++ b/cmd/version.go @@ -0,0 +1,23 @@ +package cmd + +import ( + "fmt" + + "github.com/spf13/cobra" + "elyby/minecraft-skinsystem/bootstrap" + "runtime" +) + +var versionCmd = &cobra.Command{ + Use: "version", + Short: "Show the Minecraft Skinsystem version information", + Run: func(cmd *cobra.Command, args []string) { + fmt.Printf("Version: %s\n", bootstrap.GetVersion()) + fmt.Printf("Go version: %s\n", runtime.Version()) + fmt.Printf("OS/Arch: %s/%s\n", runtime.GOOS, runtime.GOARCH) + }, +} + +func init() { + RootCmd.AddCommand(versionCmd) +}