diff --git a/error.go b/error.go index ab8d02a..2e72685 100644 --- a/error.go +++ b/error.go @@ -1,7 +1,7 @@ package grpc import ( - pberr "github.com/unistack-org/micro-client-grpc/errors" + pb "github.com/unistack-org/micro-client-grpc/internal/errors" "github.com/unistack-org/micro/v3/errors" "google.golang.org/grpc/status" ) @@ -17,7 +17,7 @@ func microError(err error) error { return verr } - if verr, ok := err.(*pberr.Error); ok { + if verr, ok := err.(*pb.Error); ok { return &errors.Error{Id: verr.Id, Code: verr.Code, Detail: verr.Detail, Status: verr.Status} } 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/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