MCPcopy Index your code
hub / github.com/gavv/httpexpect / countElement

Function countElement

array.go:1734–1742  ·  view source on GitHub ↗
(array []interface{}, element interface{})

Source from the content-addressed store, hash-verified

1732}
1733
1734func countElement(array []interface{}, element interface{}) int {
1735 count := 0
1736 for _, e := range array {
1737 if reflect.DeepEqual(element, e) {
1738 count++
1739 }
1740 }
1741 return count
1742}
1743
1744func builtinComparator(opChain *chain, array []interface{}) func(x, y *Value) bool {
1745 var prev interface{}

Callers 10

IsEqualUnorderedMethod · 0.85
NotEqualUnorderedMethod · 0.85
ContainsMethod · 0.85
NotContainsMethod · 0.85
ContainsAllMethod · 0.85
NotContainsAllMethod · 0.85
ContainsAnyMethod · 0.85
NotContainsAnyMethod · 0.85
ContainsOnlyMethod · 0.85
NotContainsOnlyMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…