Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add the go_package option to the protobuf files #57

Merged
merged 1 commit into from
Dec 3, 2020

Conversation

schischi
Copy link
Contributor

This option will soon be required to generate the Go code for the protobuf files.
Having valid protobuf files for Go would allow us to write report processors in this language.

See https://developers.google.com/protocol-buffers/docs/reference/go-generated#package

Source .proto files should contain a go_package option specifying the full Go import path for the file. If there is no go_package option, the compiler will try to guess at one. A future release of the compiler will make the go_package option a requirement. The Go package name of generated code will be the last path component of the go_package option.

Test plan:
Before:
$ protoc vulnerability.proto --go_out=/tmp/
2020/07/22 14:55:26 WARNING: Missing 'go_package' option in "vulnerability.proto",
please specify it with the full Go package path as
a future release of protoc-gen-go will require this be specified.
See https://developers.google.com/protocol-buffers/docs/reference/go-generated#package for more information.

After:
$ protoc vulnerability.proto --go_out=/tmp/
$ echo $?
0

This option will soon be required to generate the Go code for the protobuf files.
Having valid protobuf files for Go would allow us to write report processors in this language.

See https://developers.google.com/protocol-buffers/docs/reference/go-generated#package
> Source .proto files should contain a go_package option specifying the full Go import path for the file. If there is no go_package option, the compiler will try to guess at one. A future release of the compiler will make the go_package option a requirement. The Go package name of generated code will be the last path component of the go_package option.

Test plan:
 Before:
  $ protoc vulnerability.proto --go_out=/tmp/
  2020/07/22 14:55:26 WARNING: Missing 'go_package' option in "vulnerability.proto",
  please specify it with the full Go package path as
  a future release of protoc-gen-go will require this be specified.
  See https://developers.google.com/protocol-buffers/docs/reference/go-generated#package for more information.

 After:
 $ protoc vulnerability.proto --go_out=/tmp/
 $ echo $?
 0
@google-cla google-cla bot added the cla: yes label Jul 27, 2020
@copybara-service copybara-service bot merged commit 3207d9a into google:master Dec 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant