You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

25 lines
529 B

package loader
import "go/scanner"
// 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()
}
// Error is a regular error but with an added import stack. This is especially
// useful for debugging import cycle errors.
type Error struct {
ImportStack []string
Err scanner.Error
}
func (e Error) Error() string {
return e.Err.Error()
}