Documentation
¶
Index ¶
- Variables
- func Print(w io.Writer, err error)
- type List
- func (l *List) Abort()
- func (l *List) Add(pos token.Pos, msg string)deprecated
- func (l *List) AddRaw(err *scanner.Error)deprecated
- func (l *List) Addf(pos token.Pos, format string, args ...interface{})deprecated
- func (l *List) Err() error
- func (l *List) Error() string
- func (l *List) ErrorList() []*errinsrc.ErrInSrc
- func (l *List) HandleBailout(err *error)
- func (l *List) Len() int
- func (l *List) MakeRelative(root, relwd string)
- func (l *List) Merge(other *List)deprecated
- func (l *List) Report(err error)
- func (l *List) SendToStream(stream interface{ ... }) error
Constants ¶
This section is empty.
Variables ¶
View Source
var MaxErrorsToPrint = 1
MaxErrorsToPrint is the maximum number of errors to print if Verbose is false
View Source
var Verbose = false
Verbose controls whether the error list prints all errors or just the what MaxErrorsToPrint is set to
Functions ¶
Types ¶
type List ¶
type List struct {
List errinsrc.List `json:"list,omitempty"`
// contains filtered or unexported fields
}
func Convert ¶ added in v1.8.0
Convert attempts to convert known error types into an error list if it can't it returns nil
func (*List) Err ¶
Err returns an error equivalent to this error list. If the list is empty, Err returns nil.
func (*List) HandleBailout ¶
HandleBailout handles bailouts raised by (*List).Add and family when too many errors have been found.
func (*List) MakeRelative ¶
MakeRelative rewrites the errors by making filenames within the app root relative to the relwd (which must be a relative path within the root).