MCPcopy
hub / github.com/expr-lang/expr / Containsf

Method Containsf

internal/testify/require/require_forward.go:48–53  ·  view source on GitHub ↗

Containsf asserts that the specified string, list(array, slice...) or map contains the specified substring or element. a.Containsf("Hello World", "World", "error message %s", "formatted") a.Containsf(["Hello", "World"], "World", "error message %s", "formatted") a.Containsf({"Hello": "World"}, "H

(s interface{}, contains interface{}, msg string, args ...interface{})

Source from the content-addressed store, hash-verified

46// a.Containsf(["Hello", "World"], "World", "error message %s", "formatted")
47// a.Containsf({"Hello": "World"}, "Hello", "error message %s", "formatted")
48func (a *Assertions) Containsf(s interface{}, contains interface{}, msg string, args ...interface{}) {
49 if h, ok := a.t.(tHelper); ok {
50 h.Helper()
51 }
52 Containsf(a.t, s, contains, msg, args...)
53}
54
55// DirExists checks whether a directory exists in the given path. It also fails
56// if the path is a file rather a directory or there is an error checking whether it exists.

Callers

nothing calls this directly

Calls 2

ContainsfFunction · 0.70
HelperMethod · 0.45

Tested by

no test coverage detected