mirror of
https://github.com/protocolbuffers/protobuf-go.git
synced 2024-12-26 21:24:22 +00:00
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:
parent
e7ab1125a6
commit
e31c6dd73d
@ -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)
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user