-
Notifications
You must be signed in to change notification settings - Fork 301
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
internal/pkg: make Schema an alias for cue.Value
We just need to teach pkg/gen.go to use GODEBUG=gotypesalias=1 so that it can differentiate one from the other. Simplify the uses of pkg.Schema, as it is now an alias so it can be used just like a cue.Value without any need for type conversions. While here, simplify pkg/gen.go a bit by not trying to remove one level of pointers, and instead consistently expect string matches with them. We already had some cases like `[]*someType` we did this way. This should also mean that any Go users who directly call pkg/... APIs should not be broken by cue.Value parameters now being pkg.Schema, given that the latter is simply an alias now. Signed-off-by: Daniel Martí <[email protected]> Change-Id: Ib0eb8680fa7c4384cecad3ba6ab0e9e862690b91 Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1199811 Reviewed-by: Marcel van Lohuizen <[email protected]> TryBot-Result: CUEcueckoo <[email protected]> Unity-Result: CUE porcuepine <[email protected]>
- Loading branch information
Showing
7 changed files
with
26 additions
and
31 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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