I am trying to build a protocol buffer from the source code, but I could not do that. I am using Go and I would like to make some changes to the source code of the protocol buffer in Go and rebuild it again.
In the protocol buffer GitHub repository, there is a clear instruction to build protobuf binary in C++. Here is the link. In the same repository, there are no clear instructions on how to build protobuf in Go. I used brew install protoc-gen-go to install the protoc on a mac machine. It works fine, but I have a plan to make some changes in protobuf-go.
So, I guess the question is how do I recompile protoc? I appreciate your answer in the style of a step.
See Protocol Buffer Basics: Go in the Protocol Buffers Documentation.
After you've installed the compiler and protoc-gen-go plugin, run the compiler...
protoc -I=$SRC_DIR --go_out=$DST_DIR $SRC_DIR/addressbook.proto
$SRC_DIR
is where your application's code lives, and $DST_DIR
is where you want the Go code generated from the .proto file to live.