pkg: swap go/build for go/packages in gen.go
This is the first step towards using go/types to load type information
such as constant values and function signatures without handling ASTs.
No changes in the generated output.
Signed-off-by: Daniel Martí <mvdan@mvdan.cc>
Change-Id: Ie28990b225c6cf5c39bb06da76686837d02c5113
Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/557327
TryBot-Result: CUEcueckoo <cueckoo@cuelang.org>
Reviewed-by: Roger Peppe <rogpeppe@gmail.com>