MCPcopy Create free account
hub / github.com/Facets-cloud/flow / contains

Function contains

internal/app/done_test.go:280–287  ·  view source on GitHub ↗

contains is a tiny strings.Contains shim so done_test.go doesn't need a strings import just for this.

(haystack, needle string)

Source from the content-addressed store, hash-verified

278// contains is a tiny strings.Contains shim so done_test.go doesn't need
279// a strings import just for this.
280func contains(haystack, needle string) bool {
281 for i := 0; i+len(needle) <= len(haystack); i++ {
282 if haystack[i:i+len(needle)] == needle {
283 return true
284 }
285 }
286 return false
287}

Calls

no outgoing calls

Tested by

no test coverage detected