I'm trying to generate .pb.go
file using service.proto
as file input in Go.
Is there a way to do it without using protoc
binary (like directly using package github.com/golang/protobuf/protoc-gen-go
)?
I'm trying to generate .pb.go
file using service.proto
as file input in Go.
Is there a way to do it without using protoc
binary (like directly using package github.com/golang/protobuf/protoc-gen-go
)?
If you have a
detail.proto
like this:You can parse it into a message like this:
However you may notice, this package is still using the old Protobuf V1. I did find a Pull Request for V2:
https://github.com/jhump/protoreflect/pull/354