Skip to content

Commit

Permalink
Merge pull request ThreeDotsLabs#39 from Orphail/protoc-gen-go-grpc
Browse files Browse the repository at this point in the history
Plugins are no longer supported by protoc-gen-go package
  • Loading branch information
m110 authored Oct 9, 2021
2 parents 9350df9 + 8023a0d commit cd54b0f
Show file tree
Hide file tree
Showing 15 changed files with 1,068 additions and 571 deletions.
13 changes: 11 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,17 @@ openapi_js:

.PHONY: proto
proto:
protoc --go_out=plugins=grpc:internal/common/genproto/trainer -I api/protobuf api/protobuf/trainer.proto
protoc --go_out=plugins=grpc:internal/common/genproto/users -I api/protobuf api/protobuf/users.proto
protoc \
--proto_path=api/protobuf api/protobuf/trainer.proto \
--go_out=internal/common/genproto/trainer --go_opt=paths=source_relative \
--go-grpc_opt=require_unimplemented_servers=false \
--go-grpc_out=internal/common/genproto/trainer --go-grpc_opt=paths=source_relative \

protoc \
--proto_path=api/protobuf api/protobuf/users.proto \
--go_out=internal/common/genproto/users --go_opt=paths=source_relative \
--go-grpc_opt=require_unimplemented_servers=false \
--go-grpc_out=internal/common/genproto/users --go-grpc_opt=paths=source_relative \

.PHONY: lint
lint:
Expand Down
2 changes: 2 additions & 0 deletions api/protobuf/trainer.proto
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ syntax = "proto3";

package trainer;

option go_package = "github.com/ThreeDotsLabs/wild-workouts-go-ddd-example/internal/trainer";

import "google/protobuf/empty.proto";
import "google/protobuf/timestamp.proto";

Expand Down
2 changes: 2 additions & 0 deletions api/protobuf/users.proto
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ syntax = "proto3";

package users;

option go_package = "github.com/ThreeDotsLabs/wild-workouts-go-ddd-example/internal/users";

import "google/protobuf/empty.proto";

service UsersService {
Expand Down
Loading

0 comments on commit cd54b0f

Please sign in to comment.