Skip to content

Conversation

nareddyt
Copy link
Contributor

Currently, this repository only generates cc and py protos. This change adds the ability to generate *.pb.go and *.pb.validate.go files for each package.

  • Example: bazel build //udpa/data/orca/v1:pkg_go

Note that the option go_package is no longer needed in the proto files (and should not be added!). The go_package will be set automatically to match the path.

  • Example: udpa_service_orca_v1 in the generate proto

Please see my comments in this change for more details.

Note: This change is largely based on envoyproxy/envoy#8003

Signed-off-by: Teju Nareddy nareddyt@google.com

Currently, this repository only generates cc and py protos. This change adds the ability to generate *.pb.go and *.pb.validate.go files for each package.
- Example: `bazel build //udpa/data/orca/v1:pkg_go`

Note that the option `go_package` is no longer needed in the proto files (and should not be added!). The go_package will be set automatically to match the path.
- Example: udpa_service_orca_v1

Signed-off-by: Teju Nareddy <nareddyt@google.com>
Signed-off-by: Teju Nareddy <nareddyt@google.com>
Copy link
Collaborator

@htuch htuch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, this is great.

@htuch htuch merged commit 9432480 into cncf:master Aug 26, 2019
@nareddyt nareddyt deleted the go_protos branch August 26, 2019 21:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants