0

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.

JackyJohnson
  • 3,106
  • 3
  • 28
  • 35

1 Answers1

1

ok, this is dumb.

the answer is to not use the -n flag in the go generate command. that just prints what to execute without actually executing.

JackyJohnson
  • 3,106
  • 3
  • 28
  • 35