Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
WithUnknownValue to treat unknown values as a non-error
This introduces a new option "WithUnknownValue" that can be used to specify some value to use for unknown keys. Normally, bexpr will error (and this continues to be the default). However, an alternate zero value behavior can be specified to use that instead. This is useful for situations where you want to treat empty values as say... empty string so that an expression generally fails but with a false rather than an error. This also updates to pointerstructure 1.2.1 which fixes on "not found" case that wasn't wrapping ErrNotFound properly.
- Loading branch information
Showing
6 changed files
with
140 additions
and
9 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
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
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