optimize code struct
This commit is contained in:
parent
2fdda76882
commit
7e15ea4169
@ -618,7 +618,8 @@ func eq(arg1 interface{}, arg2 ...interface{}) (bool, error) {
|
|||||||
default:
|
default:
|
||||||
return false, errBadComparison
|
return false, errBadComparison
|
||||||
}
|
}
|
||||||
} else {
|
return true, nil
|
||||||
|
}
|
||||||
switch k1 {
|
switch k1 {
|
||||||
case boolKind:
|
case boolKind:
|
||||||
truth = v1.Bool() == v2.Bool()
|
truth = v1.Bool() == v2.Bool()
|
||||||
@ -633,12 +634,9 @@ func eq(arg1 interface{}, arg2 ...interface{}) (bool, error) {
|
|||||||
case uintKind:
|
case uintKind:
|
||||||
truth = v1.Uint() == v2.Uint()
|
truth = v1.Uint() == v2.Uint()
|
||||||
default:
|
default:
|
||||||
panic("invalid kind")
|
return false, errBadComparisonType
|
||||||
}
|
|
||||||
}
|
|
||||||
if truth {
|
|
||||||
return true, nil
|
|
||||||
}
|
}
|
||||||
|
return truth, nil
|
||||||
}
|
}
|
||||||
return false, nil
|
return false, nil
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user