-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
gotohelm: improve special case detection in zeroOf
Prior to this commit gotohelm would incorrectly attempt to compute the zero value of types that implemented `json.{Unm,M}arshaller`. In most cases, this would lead to a transpiler crash all together. In some corner cases, it was possible to silently generate incorrect values. This commit improves `zeroOf` to detect and reject implementers of `json.{Unm,M}arshaller` with a helpful error message and adds a special case for Kubernetes' `resource.Quantity` type.
- Loading branch information
Showing
4 changed files
with
41 additions
and
4 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