Documentation ¶
Index ¶
- Variables
- func FindEndOfFunction(srcLines []string, lineWithFunctionStart int) int
- func MatchFunc(line string) bool
- func MatchVarName(line string) *string
- func PrintErro(source error, a ...any) error
- func ReadSource(filepath string) []string
- func ReadSourceFs(filepath string, afs afero.Fs) []string
- func TestPrinterFunc(t *TestPrinter) printer
- type Config
- type PrintSourceOptions
- type StackTraceItem
- type TestPrinter
- type UsedVar
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func FindEndOfFunction ¶
func MatchVarName ¶
func ReadSource ¶
func TestPrinterFunc ¶
func TestPrinterFunc(t *TestPrinter) printer
Types ¶
type Config ¶ added in v0.6.1
type Config struct { LinesBefore int //How many lines to print *before* the error line when printing source code LinesAfter int //How many lines to print *after* the error line when printing source code }
Config holds the configuration for a logger
type PrintSourceOptions ¶
type PrintSourceOptions struct { ShortFileName string FuncLine int FailingLine int DebugLine int StartLine int EndLine int Highlighted map[int][]int UsedVars []UsedVar Stack []StackTraceItem }
PrintSourceOptions represents config for (*logger).getData func
type StackTraceItem ¶
type StackTraceItem struct { CallingObject string Args []string SourcePathRef string SourceLineRef int MysteryNumber int64 // don't know what this is, no documentation found, if you know please let me know via a PR ! }
StackTraceItem represents parsed information of a stack trace item
type TestPrinter ¶
type TestPrinter struct {
Output []string
}
func NewTestPrinter ¶
func NewTestPrinter() *TestPrinter
func (*TestPrinter) Printf ¶
func (t *TestPrinter) Printf(format string, data ...any)
Click to show internal directories.
Click to hide internal directories.