OSDN Git Service

fix commands
[bytom/shuttle.git] / vendor / github.com / bytom / cmd / bytomcli / commands / version.go
diff --git a/vendor/github.com/bytom/cmd/bytomcli/commands/version.go b/vendor/github.com/bytom/cmd/bytomcli/commands/version.go
new file mode 100644 (file)
index 0000000..d74ef88
--- /dev/null
@@ -0,0 +1,18 @@
+package commands
+
+import (
+       "runtime"
+
+       "github.com/spf13/cobra"
+       jww "github.com/spf13/jwalterweatherman"
+
+       "github.com/bytom/version"
+)
+
+var versionCmd = &cobra.Command{
+       Use:   "version",
+       Short: "Print the version number of Bytomcli",
+       Run: func(cmd *cobra.Command, args []string) {
+               jww.FEEDBACK.Printf("Bytomcli v%s %s/%s\n", version.Version, runtime.GOOS, runtime.GOARCH)
+       },
+}