This commit is contained in:
parent
7a6ed8be9b
commit
046a393313
2 changed files with 3 additions and 3 deletions
|
@ -60,7 +60,7 @@ func contains(container any, element any) bool {
|
||||||
|
|
||||||
matchingElements := 0
|
matchingElements := 0
|
||||||
|
|
||||||
for i := 0; i < containerValue.Len(); i++ {
|
for i := range containerValue.Len() {
|
||||||
if containerValue.Index(i).Interface() == elementValue.Index(matchingElements).Interface() {
|
if containerValue.Index(i).Interface() == elementValue.Index(matchingElements).Interface() {
|
||||||
matchingElements++
|
matchingElements++
|
||||||
} else {
|
} else {
|
||||||
|
@ -75,7 +75,7 @@ func contains(container any, element any) bool {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
for i := 0; i < containerValue.Len(); i++ {
|
for i := range containerValue.Len() {
|
||||||
if containerValue.Index(i).Interface() == element {
|
if containerValue.Index(i).Interface() == element {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue