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