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:
parent
2c0e01a5dd
commit
4c7ac61ed8
@ -40,7 +40,7 @@ func init() {
|
|||||||
flag.Parse()
|
flag.Parse()
|
||||||
|
|
||||||
if printVersion {
|
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)
|
gost.Version, runtime.Version(), runtime.GOOS, runtime.GOARCH)
|
||||||
os.Exit(0)
|
os.Exit(0)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user