Skip to content

Commit cd54b0f

Browse files
authored
Merge pull request #39 from Orphail/protoc-gen-go-grpc
Plugins are no longer supported by protoc-gen-go package
2 parents 9350df9 + 8023a0d commit cd54b0f

15 files changed

Lines changed: 1068 additions & 571 deletions

File tree

Makefile

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,17 @@ openapi_js:
4040

4141
.PHONY: proto
4242
proto:
43-
protoc --go_out=plugins=grpc:internal/common/genproto/trainer -I api/protobuf api/protobuf/trainer.proto
44-
protoc --go_out=plugins=grpc:internal/common/genproto/users -I api/protobuf api/protobuf/users.proto
43+
protoc \
44+
--proto_path=api/protobuf api/protobuf/trainer.proto \
45+
--go_out=internal/common/genproto/trainer --go_opt=paths=source_relative \
46+
--go-grpc_opt=require_unimplemented_servers=false \
47+
--go-grpc_out=internal/common/genproto/trainer --go-grpc_opt=paths=source_relative \
48+
49+
protoc \
50+
--proto_path=api/protobuf api/protobuf/users.proto \
51+
--go_out=internal/common/genproto/users --go_opt=paths=source_relative \
52+
--go-grpc_opt=require_unimplemented_servers=false \
53+
--go-grpc_out=internal/common/genproto/users --go-grpc_opt=paths=source_relative \
4554

4655
.PHONY: lint
4756
lint:

api/protobuf/trainer.proto

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ syntax = "proto3";
22

33
package trainer;
44

5+
option go_package = "github.com/ThreeDotsLabs/wild-workouts-go-ddd-example/internal/trainer";
6+
57
import "google/protobuf/empty.proto";
68
import "google/protobuf/timestamp.proto";
79

api/protobuf/users.proto

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ syntax = "proto3";
22

33
package users;
44

5+
option go_package = "github.com/ThreeDotsLabs/wild-workouts-go-ddd-example/internal/users";
6+
57
import "google/protobuf/empty.proto";
68

79
service UsersService {

0 commit comments

Comments
 (0)