Refactor: Consolidate Go packages for standard toolchain compatibility #210
Refactor: Consolidate Go packages for standard toolchain compatibility #210wlanmac wants to merge 10 commits intoopenconfig:mainfrom
Conversation
|
I generally like this change because it aligns closer with how we have organized protobufs in other OpenConfig projects. I think it is easier for Gazelle and other tooling to autogenerate BUILD files when there is a 1:1 mapping of proto packages to a directory. I don't know if it is reasonable to change, but I personally prefer the directory structure of |
Following PR feedback, this commit: - Moves all .proto and .pb.go files from proto/ to proto/attestz/. - Updates 'option go_package' in .proto files to github.com/openconfig/attestz/proto/attestz. - Updates all internal Go imports and Bazel rules to match the new structure. - Updates documentation and examples in README.md. This structure provides a cleaner layout for future expansion (e.g., proto/attestz_v2/).
This commit applies the clean, tool-generated Go code produced by the 'regenerate-files.sh' script. These files reflect the new consolidated package structure and updated Protobuf configurations without any manual edits.
betuls
left a comment
There was a problem hiding this comment.
Thanks for this cleanup. I agree with colsolidating the proto packages into /proto/attestz.
Problem
The previous project structure utilized a Bazel-centric layout for Protobuf generation. While this worked within a Bazel workspace, it created significant friction for standard Go
developers:
"redeclaration" errors in standard Go builds unless complex aliasing was used.
expectations.
Solution
This PR reorganizes the repository to follow idiomatic Go standards while maintaining 100% compatibility with existing Bazel/Blaze workflows:
Technical Impact
servers.
with a single apb import).