From e31c6dd73d24ea4bce7a6282c19ab38b81616ba9 Mon Sep 17 00:00:00 2001 From: Joe Tsai Date: Mon, 15 Mar 2021 16:14:28 -0700 Subject: [PATCH] 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 Reviewed-by: Damien Neil --- cmd/protoc-gen-go/main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/protoc-gen-go/main.go b/cmd/protoc-gen-go/main.go index a354df90..d3187bbd 100644 --- a/cmd/protoc-gen-go/main.go +++ b/cmd/protoc-gen-go/main.go @@ -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) }