Contains asserts that the specified string, list(array, slice...) or map contains the specified substring or element. a.Contains("Hello World", "World") a.Contains(["Hello", "World"], "World") a.Contains({"Hello": "World"}, "Hello")
(s interface{}, contains interface{}, msgAndArgs ...interface{})
| 31 | // a.Contains(["Hello", "World"], "World") |
| 32 | // a.Contains({"Hello": "World"}, "Hello") |
| 33 | func (a *Assertions) Contains(s interface{}, contains interface{}, msgAndArgs ...interface{}) bool { |
| 34 | if h, ok := a.t.(tHelper); ok { |
| 35 | h.Helper() |
| 36 | } |
| 37 | return Contains(a.t, s, contains, msgAndArgs...) |
| 38 | } |
| 39 | |
| 40 | // Containsf asserts that the specified string, list(array, slice...) or map contains the |
| 41 | // specified substring or element. |