MCPcopy Index your code
hub / github.com/FunctionStream/function-stream / contains

Function contains

admin/client/client.go:119–126  ·  view source on GitHub ↗

contains is a case insensitive match, finding needle in a haystack

(haystack []string, needle string)

Source from the content-addressed store, hash-verified

117
118// contains is a case insensitive match, finding needle in a haystack
119func contains(haystack []string, needle string) bool {
120 for _, a := range haystack {
121 if strings.EqualFold(a, needle) {
122 return true
123 }
124 }
125 return false
126}
127
128// Verify optional parameters are of the correct type.
129func typeCheckParameter(obj interface{}, expected string, name string) error {

Callers 2

selectHeaderContentTypeFunction · 0.85
selectHeaderAcceptFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected