diff --git a/examples/go-kit/Makefile b/examples/go-kit/Makefile index 2391b58..d130960 100644 --- a/examples/go-kit/Makefile +++ b/examples/go-kit/Makefile @@ -18,6 +18,6 @@ $(TARGETS_GO): %_go: $(TARGETS_TMPL): %_tmpl: @mkdir -p $(dir $*)gen - protoc -I. --gotemplate_out=template_dir=templates:services "$*" + protoc -I. --gotemplate_out=destination_dir=services/$(call service_name,$*)/gen,template_dir=templates:services "$*" @rm -rf services/services # need to investigate why this directory is created gofmt -w $(dir $*)gen diff --git a/examples/go-kit/services/session/gen/endpoints/endpoints.go b/examples/go-kit/services/session/gen/endpoints/endpoints.go index 1650868..daad857 100644 --- a/examples/go-kit/services/session/gen/endpoints/endpoints.go +++ b/examples/go-kit/services/session/gen/endpoints/endpoints.go @@ -2,6 +2,7 @@ package session_endpoints import ( "fmt" + "github.com/go-kit/kit/endpoint" pb "github.com/moul/protoc-gen-gotemplate/examples/go-kit/services/session/gen/pb" context "golang.org/x/net/context" diff --git a/examples/go-kit/services/session/gen/transports/grpc/grpc.go b/examples/go-kit/services/session/gen/transports/grpc/grpc.go index 7872d0d..f42474d 100644 --- a/examples/go-kit/services/session/gen/transports/grpc/grpc.go +++ b/examples/go-kit/services/session/gen/transports/grpc/grpc.go @@ -4,7 +4,7 @@ import ( "fmt" grpctransport "github.com/go-kit/kit/transport/grpc" - endpoint "github.com/moul/protoc-gen-gotemplate/examples/go-kit/services/session/gen/endpoints" + endpoints "github.com/moul/protoc-gen-gotemplate/examples/go-kit/services/session/gen/endpoints" pb "github.com/moul/protoc-gen-gotemplate/examples/go-kit/services/session/gen/pb" context "golang.org/x/net/context" ) @@ -12,7 +12,7 @@ import ( // avoid import errors var _ = fmt.Errorf -func MakeGRPCServer(ctx context.Context, endpoints endpoint.Endpoints) pb.SessionServiceServer { +func MakeGRPCServer(ctx context.Context, endpoints endpoints.Endpoints) pb.SessionServiceServer { options := []grpctransport.ServerOption{} return &grpcServer{ diff --git a/examples/go-kit/services/sprint/gen/endpoints/endpoints.go b/examples/go-kit/services/sprint/gen/endpoints/endpoints.go index 56a0fe5..f502b5c 100644 --- a/examples/go-kit/services/sprint/gen/endpoints/endpoints.go +++ b/examples/go-kit/services/sprint/gen/endpoints/endpoints.go @@ -2,6 +2,7 @@ package sprint_endpoints import ( "fmt" + "github.com/go-kit/kit/endpoint" pb "github.com/moul/protoc-gen-gotemplate/examples/go-kit/services/sprint/gen/pb" context "golang.org/x/net/context" diff --git a/examples/go-kit/services/sprint/gen/transports/grpc/grpc.go b/examples/go-kit/services/sprint/gen/transports/grpc/grpc.go index ce3c15f..3ae8e22 100644 --- a/examples/go-kit/services/sprint/gen/transports/grpc/grpc.go +++ b/examples/go-kit/services/sprint/gen/transports/grpc/grpc.go @@ -4,7 +4,7 @@ import ( "fmt" grpctransport "github.com/go-kit/kit/transport/grpc" - endpoint "github.com/moul/protoc-gen-gotemplate/examples/go-kit/services/sprint/gen/endpoints" + endpoints "github.com/moul/protoc-gen-gotemplate/examples/go-kit/services/sprint/gen/endpoints" pb "github.com/moul/protoc-gen-gotemplate/examples/go-kit/services/sprint/gen/pb" context "golang.org/x/net/context" ) @@ -12,7 +12,7 @@ import ( // avoid import errors var _ = fmt.Errorf -func MakeGRPCServer(ctx context.Context, endpoints endpoint.Endpoints) pb.SprintServiceServer { +func MakeGRPCServer(ctx context.Context, endpoints endpoints.Endpoints) pb.SprintServiceServer { options := []grpctransport.ServerOption{} return &grpcServer{ diff --git a/examples/go-kit/services/user/gen/endpoints/endpoints.go b/examples/go-kit/services/user/gen/endpoints/endpoints.go index 213cb50..a07b11c 100644 --- a/examples/go-kit/services/user/gen/endpoints/endpoints.go +++ b/examples/go-kit/services/user/gen/endpoints/endpoints.go @@ -2,6 +2,7 @@ package user_endpoints import ( "fmt" + "github.com/go-kit/kit/endpoint" pb "github.com/moul/protoc-gen-gotemplate/examples/go-kit/services/user/gen/pb" context "golang.org/x/net/context" diff --git a/examples/go-kit/services/user/gen/transports/grpc/grpc.go b/examples/go-kit/services/user/gen/transports/grpc/grpc.go index 3b3e376..1daf45b 100644 --- a/examples/go-kit/services/user/gen/transports/grpc/grpc.go +++ b/examples/go-kit/services/user/gen/transports/grpc/grpc.go @@ -4,7 +4,7 @@ import ( "fmt" grpctransport "github.com/go-kit/kit/transport/grpc" - endpoint "github.com/moul/protoc-gen-gotemplate/examples/go-kit/services/user/gen/endpoints" + endpoints "github.com/moul/protoc-gen-gotemplate/examples/go-kit/services/user/gen/endpoints" pb "github.com/moul/protoc-gen-gotemplate/examples/go-kit/services/user/gen/pb" context "golang.org/x/net/context" ) @@ -12,7 +12,7 @@ import ( // avoid import errors var _ = fmt.Errorf -func MakeGRPCServer(ctx context.Context, endpoints endpoint.Endpoints) pb.UserServiceServer { +func MakeGRPCServer(ctx context.Context, endpoints endpoints.Endpoints) pb.UserServiceServer { options := []grpctransport.ServerOption{} return &grpcServer{