-
Notifications
You must be signed in to change notification settings - Fork 113
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add go_proto_library plus generated files for "go build". (#72)
Generating Go code like this matches the pattern precedented by https://github.com/google/go-genproto for Google APIs. Generated files are placed in: - v2/ for remote execution, matching the style used by go-genproto for versioned APIs, e.g. https://github.com/google/go-genproto/blob/master/googleapis/appengine/v1/appengine.pb.go#L4 - semver/ for semver library, matching the style used by go-genproto for unversioned APIs, e.g. https://github.com/google/go-genproto/blob/master/googleapis/api/distribution/distribution.pb.go#L4 Unlike go-genproto, we use Bazel to generate the Go code, which is much simpler, since it handles calling protoc for us. We add a pre-commit hook to generate Go code before each commit, and add it to that commit. go.mod and go.sum generated by: ``` go mod init github.com/bazelbuild/remote-apis go build ./... ``` I tested this by creating a Go project that imports this proto and confirmed that I can build it with Bazel and go build. This addresses issue #65.
- Loading branch information
Showing
9 changed files
with
3,541 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.