InArray, Argumente umgedreht

test
Klaus Wendel 5 years ago
parent fde0c2b704
commit dd6a462a2f

@ -110,7 +110,7 @@ func Ip4or6(s string) uint8 {
return 0
}
func InArray(val interface{}, array interface{}) (exists bool, index int) {
func InArray(array interface{}, value interface{}) (exists bool, index int) {
exists = false
index = -1
@ -119,7 +119,7 @@ func InArray(val interface{}, array interface{}) (exists bool, index int) {
s := reflect.ValueOf(array)
for i := 0; i < s.Len(); i++ {
if reflect.DeepEqual(val, s.Index(i).Interface()) == true {
if reflect.DeepEqual(value, s.Index(i).Interface()) == true {
index = i
exists = true
return

Loading…
Cancel
Save