
This commit replaces the existing ad-hoc package loader with a package loader that uses the x/tools/go/packages package to find all to-be-loaded packages.
12 строки
255 Б
Go
12 строки
255 Б
Go
package loader
|
|
|
|
// Errors contains a list of parser errors or a list of typechecker errors for
|
|
// the given package.
|
|
type Errors struct {
|
|
Pkg *Package
|
|
Errs []error
|
|
}
|
|
|
|
func (e Errors) Error() string {
|
|
return "could not compile: " + e.Errs[0].Error()
|
|
}
|