This commit is contained in:
Magnus Åhall 2023-09-26 09:37:09 +02:00
parent ebf3a9aa38
commit 6fb67141fe

14
pkg.go
View File

@ -10,15 +10,15 @@ import (
type Error struct {
Wrapped error
File string
Line int
Data interface{}
File string
Line int
Data interface{}
}
type LogCallback func(Error)
var (
logCallback LogCallback
logCallback LogCallback
baseDirLength int
)
@ -57,9 +57,9 @@ func create(err error, data interface{}) error {
wrapped := Error{
Wrapped: err,
File: file,
Line: line,
Data: data,
File: file,
Line: line,
Data: data,
}
callback(wrapped)