Update templatefunc.go

This commit is contained in:
jianzhiyao 2021-05-14 11:34:46 +08:00 committed by GitHub
parent 7e15ea4169
commit f4d4591962
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -618,7 +618,9 @@ func eq(arg1 interface{}, arg2 ...interface{}) (bool, error) {
default: default:
return false, errBadComparison return false, errBadComparison
} }
return true, nil if truth {
return true, nil
}
} }
switch k1 { switch k1 {
case boolKind: case boolKind:
@ -636,7 +638,9 @@ func eq(arg1 interface{}, arg2 ...interface{}) (bool, error) {
default: default:
return false, errBadComparisonType return false, errBadComparisonType
} }
return truth, nil if truth {
return true, nil
}
} }
return false, nil return false, nil
} }