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í <mvdan@mvdan.cc>
Change-Id: Ib0eb8680fa7c4384cecad3ba6ab0e9e862690b91
Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1199811
Reviewed-by: Marcel van Lohuizen <mpvl@gmail.com>
TryBot-Result: CUEcueckoo <cueckoo@cuelang.org>
Unity-Result: CUE porcuepine <cue.porcuepine@gmail.com>