I have the following .proto file:
$GOPATH/src/github.com/path/to/package/myPkg.proto
with the following first few lines:
syntax="proto3";
package myPkg;
option go_package = "github.com/path/to/package";
Then I am creating a .go file with the following
//go:generate protoc -I $GOPATH/src/github.com/path/to/package --go_out=plugins=grpc:$GOPATH/src myPkg.proto
package someRandomGoPackage
The above protoc
command works perfectly when run from bash
(a new myPkg.pb.go
is created under github.com/path/to/package
), but it does nothing when I run go generate -x -v -n
except print the command.