MCPcopy
hub / github.com/go-gorm/gorm / CheckTruth

Function CheckTruth

utils/utils.go:77–84  ·  view source on GitHub ↗

CheckTruth check string true or not

(vals ...string)

Source from the content-addressed store, hash-verified

75
76// CheckTruth check string true or not
77func CheckTruth(vals ...string) bool {
78 for _, val := range vals {
79 if val != "" && !strings.EqualFold(val, "false") {
80 return true
81 }
82 }
83 return false
84}
85
86func ToStringKey(values ...interface{}) string {
87 results := make([]string, len(values))

Callers 2

ParseFieldMethod · 0.92
TestCheckTruthFunction · 0.85

Calls

no outgoing calls

Tested by 1

TestCheckTruthFunction · 0.68