This tool generates Go language bindings of services in protobuf definition files for mocking gRPC.
go install github.com/kw510/protoc-gen-go-mock@latest
Also required:
go install google.golang.org/protobuf/cmd/protoc-gen-go@latest
go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest
protoc --go_out=.examples \
--go-grpc_out=.examples \
--go-mock_out=.examples \
.examples/petstore.proto
mkdir .build
export PATH=$PATH:$(pwd)/.build
go build -o ./.build