cmd/protoc-gen-go: print version to stdout

Fixes #1279

Change-Id: I2f5459087c915cd1fc1e38ccbaa7c44b0f286137
Reviewed-on: https://go-review.googlesource.com/c/protobuf/+/301952
Trust: Joe Tsai <joetsai@digital-static.net>
Reviewed-by: Damien Neil <dneil@google.com>
This commit is contained in:
Joe Tsai 2021-03-15 16:14:28 -07:00
parent e7ab1125a6
commit e31c6dd73d

View File

@ -23,7 +23,7 @@ import (
func main() {
if len(os.Args) == 2 && os.Args[1] == "--version" {
fmt.Fprintf(os.Stderr, "%v %v\n", filepath.Base(os.Args[0]), version.String())
fmt.Fprintf(os.Stdout, "%v %v\n", filepath.Base(os.Args[0]), version.String())
os.Exit(0)
}