Skip to content

Lists and objects ​

GoMock fileMatches
Len(n)len, lengthText of n bytes, or a list or an object of n items.
Each(m)eachA list whose items, or an object whose members, all match m.
Some(m)someA list with an item that matches m.
Item(i, m)itemA list whose item at i matches m.
ItemsMatch(items)itemsmatchA list holding items in any order, and nothing else.
hasexactlyA list of as many values as matchers, each matched by a matcher of its own, in any order: [hasExactly, [[equal, "1"], [contains, "2"]]]. In Go, ItemsMatch takes matchers as items.
HasKey(path)haskeyAn object that has the key, or JSON path.