1
0
mirror of https://github.com/go-micro/go-micro.git synced 2024-12-24 10:07:04 +02:00

Merge pull request #4 from crackcomm/master

Fixes nil pointer dereference error
This commit is contained in:
Asim 2015-01-30 17:34:30 +00:00
commit 1ec39571a8

View File

@ -27,8 +27,8 @@ func New(id, detail string, code int32) error {
}
func Parse(err string) *Error {
var e *Error
errr := json.Unmarshal([]byte(err), &e)
e := new(Error)
errr := json.Unmarshal([]byte(err), e)
if errr != nil {
e.Detail = err
}