I'm using go protobuf with GRPC. Can you explain what will be the implication if plugin is not specified while generating the .pb.go file in this case? Will there be compilation issues related to protobuf package by any chance? Because, I'm indeed facing that right now. However I regenerated the .pb.go file specifying the plugin but it didn't solve the error. I've created a separate post for that error here -> https://groups.google.com/forum/#!topic/protobuf/bk4UY0oM910 . In short, I'm facing a problem of possible mismatch in the proto package and the protoc-gen-go.
On Tuesday, August 6, 2019 at 12:46:39 AM UTC+2, Adam Cozzette wrote: > > I think the first one specifies a plugin needed for gRPC, but if you're > just using Go protobuf without gRPC then there is no need to specify a > plugin. > > On Mon, Aug 5, 2019 at 3:23 AM Niket Agrawal <[email protected] > <javascript:>> wrote: > >> Hello, >> >> I came across two versions of the command to produce the compiler >> generated code for the .proto files I wrote and I am seeking clarification >> on which one should I use for my purpose. I am using Golang for my >> application development so after installing the protoc comiler I already >> installed the protoc plugin for Golang. I presume a flag or a plugin should >> be passed to the command to let the compiler generate code for that >> particular language? >> >> The first command I came across s mentioned on the GRPC Golang tutotials ( >> https://grpc.io/docs/quickstart/go/) >> >> *protoc -I helloworld/ helloworld/helloworld.proto >> --go_out=plugins=grpc:helloworld* >> >> The second command that I came across is on the protocol buffers Golang >> tutorial page ( >> https://developers.google.com/protocol-buffers/docs/gotutorial) >> >> *protoc -I=$SRC_DIR --go_out=$DST_DIR $SRC_DIR/addressbook.proto* >> >> The main difference I see on comparing the two commands is that the first >> one specifies a plugin while the second one doesn't. Could anyone explain >> this difference and which one should work for my case? >> >> Regards, >> Niket >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Protocol Buffers" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected] <javascript:>. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/protobuf/fb191364-d7a1-48f4-ae9a-4a71fd4c816b%40googlegroups.com >> >> <https://groups.google.com/d/msgid/protobuf/fb191364-d7a1-48f4-ae9a-4a71fd4c816b%40googlegroups.com?utm_medium=email&utm_source=footer> >> . >> > -- You received this message because you are subscribed to the Google Groups "Protocol Buffers" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/protobuf/8307a9e0-6f07-4900-9bc9-7feaa1260fdd%40googlegroups.com.
