From 8ab2fe6f77d43fdd5613569377f9e853a84bcc4d Mon Sep 17 00:00:00 2001 From: Raymond Liu Date: Fri, 6 Mar 2020 19:42:51 +0800 Subject: [PATCH] Print version info to Stdout instead of Stderr Otherwise we can't get the right version information by this: ```shell gost -V | cut -d' ' -f2 ``` --- cmd/gost/main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/gost/main.go b/cmd/gost/main.go index fd520d6..4a157b2 100644 --- a/cmd/gost/main.go +++ b/cmd/gost/main.go @@ -40,7 +40,7 @@ func init() { flag.Parse() if printVersion { - fmt.Fprintf(os.Stderr, "gost %s (%s %s/%s)\n", + fmt.Fprintf(os.Stdout, "gost %s (%s %s/%s)\n", gost.Version, runtime.Version(), runtime.GOOS, runtime.GOARCH) os.Exit(0) }