-
Notifications
You must be signed in to change notification settings - Fork 60
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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]>
- Loading branch information
Showing
2 changed files
with
145 additions
and
55 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters