forked from mirror/gin
Cosmetic changes
This commit is contained in:
parent
ffaf49da0e
commit
992b00f96a
|
@ -21,13 +21,16 @@ const (
|
|||
ErrorTypeNu = 2
|
||||
)
|
||||
|
||||
// Used internally to collect errors that occurred during an http request.
|
||||
type Error struct {
|
||||
type (
|
||||
Error struct {
|
||||
Err error `json:"error"`
|
||||
Type int `json:"-"`
|
||||
Meta interface{} `json:"meta"`
|
||||
}
|
||||
|
||||
errorMsgs []*Error
|
||||
)
|
||||
|
||||
var _ error = &Error{}
|
||||
|
||||
func (msg *Error) SetType(flags int) *Error {
|
||||
|
@ -69,8 +72,6 @@ func (msg *Error) Error() string {
|
|||
return msg.Err.Error()
|
||||
}
|
||||
|
||||
type errorMsgs []*Error
|
||||
|
||||
func (a errorMsgs) ByType(typ int) errorMsgs {
|
||||
if len(a) == 0 {
|
||||
return a
|
||||
|
|
Loading…
Reference in New Issue