Skip to content

Commit

Permalink
use for-loop instead of range
Browse files Browse the repository at this point in the history
  • Loading branch information
zihengCat committed Jun 25, 2021
1 parent ddbdd79 commit 4cb798f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions binding/default_validator.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ func (err sliceValidateError) Error() string {
b.WriteString(fmt.Sprintf("[%d]: %s", 0, err[0].Error()))
}
if n > 1 {
for i, e := range err[1:] {
if e != nil {
for i := 1; i < n; i++ {
if err[i] != nil {
b.WriteString("\n")
b.WriteString(fmt.Sprintf("[%d]: %s", i, err[i].Error()))
}
Expand Down

0 comments on commit 4cb798f

Please sign in to comment.