MCPcopy
hub / github.com/google/mtail / Add

Method Add

internal/runtime/compiler/errors/errors.go:27–32  ·  view source on GitHub ↗

Add appends an error at a position to the list of errors.

(pos *position.Position, msg string)

Source from the content-addressed store, hash-verified

25
26// Add appends an error at a position to the list of errors.
27func (p *ErrorList) Add(pos *position.Position, msg string) {
28 if pos == nil {
29 pos = &position.Position{"", -1, -1, -1}
30 }
31 *p = append(*p, &compileError{*pos, msg})
32}
33
34// Append puts an ErrorList on the end of this ErrorList.
35func (p *ErrorList) Append(l ErrorList) {

Callers 15

TestNilErrorPositionFunction · 0.95
ProgzHandlerMethod · 0.45
LoadProgramMethod · 0.45
CompileAndRunMethod · 0.45
NewFunction · 0.45
UnloadProgramMethod · 0.45
VisitBeforeMethod · 0.45
checkSymbolTableMethod · 0.45
VisitAfterMethod · 0.45
checkRegexMethod · 0.45
VisitBeforeMethod · 0.45
ErrorPMethod · 0.45

Calls

no outgoing calls

Tested by 1

TestNilErrorPositionFunction · 0.76