Skip to content
Myr

Cosmetic changes

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Manu Mtz-Almeida · committed by Manu Mtz-Almeida · parent ffaf49d · Browse files · 1 file+9 added−8 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+9 added−8 removed

  • other:+9 added−8 removed

1 file+9 added−8 removed

modified:errors.go+9 added-8 removed
19 unmodified lines
20 ErrorTypeAny = 0xffffffff21 ErrorTypeNu = 222)2324// Used internally to collect errors that occurred during an http request.25type Error struct {26 Err error `json:"error"`27 Type int `json:"-"`28 Meta interface{} `json:"meta"`29}24type (25 Error struct {26 Err error `json:"error"`27 Type int `json:"-"`28 Meta interface{} `json:"meta"`29 }3031 errorMsgs []*Error32)3334var _ error = &Error{}3536func (msg *Error) SetType(flags int) *Error {37 msg.Type = flags
33 unmodified lines
71func (msg *Error) Error() string {72 return msg.Err.Error()73}7472type errorMsgs []*Error7375func (a errorMsgs) ByType(typ int) errorMsgs {76 if len(a) == 0 {77 return a78 }
60 unmodified lines