Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use %v when formatting objects in assert.Len #1086

Closed
wants to merge 1 commit into from

Commits on Jun 2, 2021

  1. Use %v when formatting objects in assert.Len

    It was using %s, which doesn't work if the thing being len'ed is not a
    `[]string` or similar.  For example, `assert.Len(t, []int{1}, 0)` says
    that `[%!s(int=1)] should have 1 item(s), but has 0`.  Now it uses `%v`
    which will work for almost anything.
    benjaminjkraft committed Jun 2, 2021
    Configuration menu
    Copy the full SHA
    93cb2be View commit details
    Browse the repository at this point in the history