move errors to internal
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
parent
83b3167030
commit
c59d400857
4
error.go
4
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}
|
||||
}
|
||||
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user