Skip to content

Commit

Permalink
modify Freach function
Browse files Browse the repository at this point in the history
  • Loading branch information
ixiongjianbo committed Jun 27, 2023
1 parent 929beec commit e5be5c3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions query.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ import (
"reflect"
)

func Foreach[T comparable](list []T, f func(line int, row *T)) {
func Foreach[T comparable](list []T, f func(i int, row T)) {
for i, item := range list {
f(i, &item)
f(i, item)
list[i] = item
}
}
Expand Down

0 comments on commit e5be5c3

Please sign in to comment.