-
Notifications
You must be signed in to change notification settings - Fork 18.3k
Description
We should simplify and stabilize the go/loader package's API. Before that happens, there are a number of features to add and bugs to fix:
Features:
-
support ... patterns just like "go build" and "go list" do. (Ideally the logic would be shared. Russ suggested fork/execing "go list", but I don't like this approach: it uses the actual file system instead of the abstraction defined by build.Context.)
-
Allow packages specified on the command line to use cgo. Currently only imported packages are subject to cgo preprocessing.
-
Support pkg-config.
API simplifications:
-
The public fields of loader.Program are sometimes annoying to use. Study existing clients and come up with something more convenient.
-
Update the go/types tutorial at https://github.com/golang/example/tree/master/gotypes.
Once this is done, we should use go/loader in tools such as golint, govet and stringer.
cc: @griesemer