Closed
Description
This error message in assert.Len
assumes that whatever you are asserting a length about can be formatted with the %s
format string.
if l != length {
return Fail(t, fmt.Sprintf("\"%s\" should have %d item(s), but has %d", object, length, l), msgAndArgs...)
}
If you look at the failure in e.g. https://drone.grafana.net/grafana/dskit/3189/1/4, I believe this is a []uint32, which is being formatted as "[%!s(uint32=2452015680) %!s(uint32=2476020736)]"
.
I think the %v
format string might be a better fit.