Although slices, maps, channels and more can be tested for emptiness using the emptiness any-matchers, testing for a specific length requires a more cumbersome test using the built-in len function, such as:
Expect(len(sut)).To(Equal(5))
A HaveLen any-matcher could be implemented using the existing emptiness matcher infrastructure to enable more flexible and intuitive tests:
Expect(sut).Should(HaveLen(5))