Skip to content

Commit

Permalink
cmd/protoc-gen-go: print version to stdout
Browse files Browse the repository at this point in the history
Fixes #1279

Change-Id: I2f5459087c915cd1fc1e38ccbaa7c44b0f286137
Reviewed-on: https://go-review.googlesource.com/c/protobuf/+/301952
Trust: Joe Tsai <[email protected]>
Reviewed-by: Damien Neil <[email protected]>
  • Loading branch information
dsnet committed Mar 16, 2021
1 parent e7ab112 commit e31c6dd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cmd/protoc-gen-go/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}

Expand Down

0 comments on commit e31c6dd

Please sign in to comment.