Open
Conversation
Many fields in a struct are builtin fields like int, uint, etc, or slices/maps containing builtins. For those, we can decode directly via the type switch, instead of using the reflection mechanism.
…maps containing these)
move baseTyp and ptrTyp into structFieldInfo, so we don't keep adding to the PathNode when only wrapper structFieldInfo needs it.
…-use rvPtr function
…t/map/slice/array)
- use the actual field value, not a de-referenced one - check if an empty container value in one call (not 2 separate switch statements potentially)
…g a pointer to a nil map first
codecgen is no longer supported in this version. Remove remaining traces of it in the codebase.
refactor structFieldInfoNode from structFieldInfoPathNode, to simulate a leaf node without a parent. Attach some key methods to it. Add structFieldInfo.field(No)Alloc methods
This way, working with one Handle will not pull in the rest of the formats into your executable build.
…TimeFormat options
This also fixes the time.Time encoding in unix* format on 32-bit OS
We kept commented out code at bottom of files for easy access. As we prepare to release a new version, we can now clean up the codebase and remove the clutter.
…e fmt.Sprintf not strconv.Itoa)
- introduce testEqualOpts to generalize testEqual function: testEqual is for basic diff support, while testEqualFlex adds more config specific to these files - use testEqualFlex all over values_test_flex, which tracks many known types with "ignore unexported" - simplify one-off "one pass" execution of encode/decode - move how wraps and other types will continue to be supported
…eunexported for go-cmp
…nced in go.mod and go.sum
This way, we bubble up the right tracked error if available. Fixes #421
…xtension If encoding or decoding an extension, checkExt must be false once EncodeExt or DecodeExt is called, else we can fall into an infinite loop or bypass encoding/decoding appropriately. Fixes #426
… a json number Fixes #427
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
See Commits and Changes for more details.
Created by
pull[bot]
Can you help keep this open source service alive? 💖 Please sponsor : )