Better print formatting for Errors

This commit is contained in:
Manu Mtz-Almeida 2014-07-04 04:31:11 +02:00
parent 7582b9077c
commit 91df54a5c2
1 changed files with 2 additions and 1 deletions

3
gin.go
View File

@ -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()
}