mirror of https://github.com/gin-gonic/gin.git
Better print formatting for Errors
This commit is contained in:
parent
7582b9077c
commit
91df54a5c2
3
gin.go
3
gin.go
|
@ -71,9 +71,10 @@ type (
|
|||
func (a ErrorMsgs) String() string {
|
||||
var buffer bytes.Buffer
|
||||
for i, msg := range a {
|
||||
text := fmt.Sprintf("Error #%02d: %s \n Meta: %v\n\n", (i + 1), msg.Err, msg.Meta)
|
||||
text := fmt.Sprintf("Error #%02d: %s \n Meta: %v\n", (i + 1), msg.Err, msg.Meta)
|
||||
buffer.WriteString(text)
|
||||
}
|
||||
buffer.WriteString("\n")
|
||||
return buffer.String()
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue