Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This is not as useful for Go as it is for other languages, but it's consistent and it saves an Apply call. Ideally we would handle nested Output types during marshalling, but to do that correctly we need some way to get access to per-call-to-JSONMarshal flags to note if we see any unknowns, or secrets. Go just (AFAIK) have any way to support doing that. So we do the next best thing which is we at least error that nested Outputs can't be marshalled. Note that the `Output` interface doesn't embed the `Marshal` interface because there _may_ be users who have wrote their own `Output` types and that would be a breaking change.
- Loading branch information
Showing
5 changed files
with
386 additions
and
0 deletions.
There are no files selected for viewing
4 changes: 4 additions & 0 deletions
4
changelog/pending/20221209--sdk-go--add-jsonmarshal-to-go-sdk.yaml
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
changes: | ||
- type: feat | ||
scope: sdk/go | ||
description: Add JSONMarshal to go sdk. |
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
Oops, something went wrong.