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
```
This commit is contained in:
Raymond Liu
2020-03-20 21:31:41 +08:00
committed by ginuerzh
parent d474a0c417
commit 8ab2fe6f77
+1 -1
View File
@@ -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)
}