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