From c62755cdae1f5142c8388fd4bc9b87cceed31f3b Mon Sep 17 00:00:00 2001 From: Vasiliy Tolstov Date: Mon, 28 Sep 2020 12:12:52 +0300 Subject: [PATCH] move errors to internal Signed-off-by: Vasiliy Tolstov --- error.go | 2 +- generate.go | 2 +- grpc.go | 2 +- {errors => internal/errors}/errors.go | 0 {errors => internal/errors}/errors.pb.go | 0 {errors => internal/errors}/errors.pb.micro.go | 0 {errors => internal/errors}/errors.proto | 0 7 files changed, 3 insertions(+), 3 deletions(-) rename {errors => internal/errors}/errors.go (100%) rename {errors => internal/errors}/errors.pb.go (100%) rename {errors => internal/errors}/errors.pb.micro.go (100%) rename {errors => internal/errors}/errors.proto (100%) diff --git a/error.go b/error.go index 681f6aa..1a0d9e2 100644 --- a/error.go +++ b/error.go @@ -6,7 +6,7 @@ import ( "net/http" "os" - pb "github.com/unistack-org/micro-server-grpc/errors" + pb "github.com/unistack-org/micro-server-grpc/internal/errors" "github.com/unistack-org/micro/v3/errors" "google.golang.org/grpc/codes" ) diff --git a/generate.go b/generate.go index 599d850..31c7626 100644 --- a/generate.go +++ b/generate.go @@ -1,3 +1,3 @@ package grpc -//go:generate protoc -I./errors -I. --go-grpc_out=paths=source_relative:./errors --go_out=paths=source_relative:./errors --micro_out=paths=source_relative:./errors errors/errors.proto +//go:generate protoc -I./internal/errors -I. --go-grpc_out=paths=source_relative:./internal/errors --go_out=paths=source_relative:./internal/errors --micro_out=paths=source_relative:./internal/errors internal/errors/errors.proto diff --git a/grpc.go b/grpc.go index 562a2be..27c74fc 100644 --- a/grpc.go +++ b/grpc.go @@ -15,7 +15,7 @@ import ( "time" oldproto "github.com/golang/protobuf/proto" - pberr "github.com/unistack-org/micro-server-grpc/errors" + pberr "github.com/unistack-org/micro-server-grpc/internal/errors" "github.com/unistack-org/micro/v3/broker" "github.com/unistack-org/micro/v3/errors" "github.com/unistack-org/micro/v3/logger" diff --git a/errors/errors.go b/internal/errors/errors.go similarity index 100% rename from errors/errors.go rename to internal/errors/errors.go diff --git a/errors/errors.pb.go b/internal/errors/errors.pb.go similarity index 100% rename from errors/errors.pb.go rename to internal/errors/errors.pb.go diff --git a/errors/errors.pb.micro.go b/internal/errors/errors.pb.micro.go similarity index 100% rename from errors/errors.pb.micro.go rename to internal/errors/errors.pb.micro.go diff --git a/errors/errors.proto b/internal/errors/errors.proto similarity index 100% rename from errors/errors.proto rename to internal/errors/errors.proto