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

Proposal: Remove Must and Should when binding structs #3178

Closed
wants to merge 6 commits into from

Commits on Oct 17, 2024

  1. Fix nil pointer dereference with Must Bind binding error

    if err is nil err.Error() panics
    (eg. c.Bind().Must().JSON(...) successfully binds but panics
    ItsMeSamey authored Oct 17, 2024
    Configuration menu
    Copy the full SHA
    0fa70ab View commit details
    Browse the repository at this point in the history

Commits on Oct 18, 2024

  1. Added returnErr test

    make sure returnErr works with nil error
    ItsMeSamey authored Oct 18, 2024
    Configuration menu
    Copy the full SHA
    791f4ba View commit details
    Browse the repository at this point in the history
  2. Reordered returnErr nil check

    as in majority of cases we expect err to be nil, this should provide better short-cutting
    ItsMeSamey authored Oct 18, 2024
    Configuration menu
    Copy the full SHA
    dde670f View commit details
    Browse the repository at this point in the history
  3. Use require.NoError

    gaby authored Oct 18, 2024
    Configuration menu
    Copy the full SHA
    94d08ad View commit details
    Browse the repository at this point in the history
  4. Update bind_test.go

    gaby authored Oct 18, 2024
    Configuration menu
    Copy the full SHA
    b15eda0 View commit details
    Browse the repository at this point in the history

Commits on Oct 23, 2024

  1. removed Must

    ItsMeSamey committed Oct 23, 2024
    Configuration menu
    Copy the full SHA
    dde4c81 View commit details
    Browse the repository at this point in the history