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

Decouple time.Time parsing from empty interface behavior. #503

Commits on Mar 13, 2024

  1. Decouple time.Time parsing from empty interface behavior.

    Due to an implementation detail, options controlling decodes into empty interface values could in
    some cases affect the behavior of decoding into time.Time. That is fixed. This patch also clarifies
    the documentation and reconciles a couple edge-case behaviors:
    
    1. In TimeTag mode DecTagIgnored, decoding a null or undefined simple value enclosed in a tag other
    than 0 or 1 to time.Time is now a no-op. This is the same as the existing behavior when decoding an
    untagged null or undefined.
    
    2. The content type enclosed by tags 0 and 1 were not being validated if enclosed within an
    unrecognized tag. This has been fixed.
    
    Signed-off-by: Ben Luddy <[email protected]>
    benluddy committed Mar 13, 2024
    Configuration menu
    Copy the full SHA
    865ac96 View commit details
    Browse the repository at this point in the history