aboutsummaryrefslogtreecommitdiff
path: root/vendor/github.com/onsi/ginkgo/ginkgo/version_command.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com/onsi/ginkgo/ginkgo/version_command.go')
-rw-r--r--vendor/github.com/onsi/ginkgo/ginkgo/version_command.go24
1 files changed, 24 insertions, 0 deletions
diff --git a/vendor/github.com/onsi/ginkgo/ginkgo/version_command.go b/vendor/github.com/onsi/ginkgo/ginkgo/version_command.go
new file mode 100644
index 000000000..f586908e8
--- /dev/null
+++ b/vendor/github.com/onsi/ginkgo/ginkgo/version_command.go
@@ -0,0 +1,24 @@
+package main
+
+import (
+ "flag"
+ "fmt"
+
+ "github.com/onsi/ginkgo/config"
+)
+
+func BuildVersionCommand() *Command {
+ return &Command{
+ Name: "version",
+ FlagSet: flag.NewFlagSet("version", flag.ExitOnError),
+ UsageCommand: "ginkgo version",
+ Usage: []string{
+ "Print Ginkgo's version",
+ },
+ Command: printVersion,
+ }
+}
+
+func printVersion([]string, []string) {
+ fmt.Printf("Ginkgo Version %s\n", config.VERSION)
+}