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

assert: better formatting for Len() error #1485

Merged
merged 3 commits into from
Feb 16, 2024

Commits on Feb 15, 2024

  1. assert: better formatting for Len() error

    Previously, the use of %s with array objects meant you would get an
    error like this:
    
        "[%!s(int=1) %!s(int=2) %!s(int=3)]\" should have 4 item(s), but has 3
    
    Use %v instead, which provides a much nicer error.
    
        "[1 2 3]" should have 4 item(s), but has 3
    
    Fixes stretchr#1482.
    kevinburkesegment committed Feb 15, 2024
    Configuration menu
    Copy the full SHA
    f7fedd9 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    f6ed021 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    89c0872 View commit details
    Browse the repository at this point in the history