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

fix: allow ForceSendFields to work for map types #2670

Merged
merged 4 commits into from
Jul 8, 2024

Commits on Jul 3, 2024

  1. fix: allow ForceSendFields to work for map types

    The way we generate map types today is map[string]T, where T is a
    non-pointer type. This means the value receiver version of
    MarshalJSON does not fullfill the Marshaler interface. This is turn
    means that MarshalJSON is not called in these cases so ForceSendFields
    overrides do not work. To fix this we can switch the impl to a value
    reciever which fullfills both value and pointer types. This is not a
    breaking change for the API, but there is a slight behaviour change
    if someone was calling MarshalJSON directly. Nil *T's that call
    MarshalJSON directly will now panic instead of returning JSON `null`.
    This seems like unlikely usage and worth breaking to fix a bug in
    common usage.
    codyoss committed Jul 3, 2024
    Configuration menu
    Copy the full SHA
    b6be984 View commit details
    Browse the repository at this point in the history
  2. regen

    codyoss committed Jul 3, 2024
    Configuration menu
    Copy the full SHA
    093cace View commit details
    Browse the repository at this point in the history
  3. update golden

    codyoss committed Jul 3, 2024
    Configuration menu
    Copy the full SHA
    3161522 View commit details
    Browse the repository at this point in the history

Commits on Jul 8, 2024

  1. Configuration menu
    Copy the full SHA
    01b397a View commit details
    Browse the repository at this point in the history