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

Function Containsf

internal/testify/require/require.go:57–65  ·  view source on GitHub ↗

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

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

Source from the content-addressed store, hash-verified

55// assert.Containsf(t, ["Hello", "World"], "World", "error message %s", "formatted")
56// assert.Containsf(t, {"Hello": "World"}, "Hello", "error message %s", "formatted")
57func Containsf(t TestingT, s interface{}, contains interface{}, msg string, args ...interface{}) {
58 if h, ok := t.(tHelper); ok {
59 h.Helper()
60 }
61 if assert.Containsf(t, s, contains, msg, args...) {
62 return
63 }
64 t.FailNow()
65}
66
67// DirExists checks whether a directory exists in the given path. It also fails
68// if the path is a file rather a directory or there is an error checking whether it exists.

Callers 1

ContainsfMethod · 0.70

Calls 3

ContainsfFunction · 0.92
FailNowMethod · 0.65
HelperMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…