mirror of
https://github.com/go-micro/go-micro.git
synced 2025-07-12 22:41:07 +02:00
Merge pull request #4 from crackcomm/master
Fixes nil pointer dereference error
This commit is contained in:
@ -27,8 +27,8 @@ func New(id, detail string, code int32) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func Parse(err string) *Error {
|
func Parse(err string) *Error {
|
||||||
var e *Error
|
e := new(Error)
|
||||||
errr := json.Unmarshal([]byte(err), &e)
|
errr := json.Unmarshal([]byte(err), e)
|
||||||
if errr != nil {
|
if errr != nil {
|
||||||
e.Detail = err
|
e.Detail = err
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user