tinygo/loader/errors.go
Ayke van Laethem 4ca2d3f0cf loader: load packages using Go modules
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.
2020-05-27 13:08:17 +02:00

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()
}