v0.0.234
This commit is contained in:
@@ -16,23 +16,25 @@ type ErrorPackageConfig struct {
|
||||
}
|
||||
|
||||
type ErrorPackageConfigInit struct {
|
||||
ZeroLogErrTraces bool
|
||||
ZeroLogAllTraces bool
|
||||
RecursiveErrors bool
|
||||
ExtendedGinOutput bool
|
||||
ExtendGinOutput func(err *ExErr, json map[string]any)
|
||||
ExtendGinDataOutput func(err *ExErr, depth int, json map[string]any)
|
||||
ZeroLogErrTraces bool
|
||||
ZeroLogAllTraces bool
|
||||
RecursiveErrors bool
|
||||
ExtendedGinOutput bool
|
||||
IncludeMetaInGinOutput bool
|
||||
ExtendGinOutput func(err *ExErr, json map[string]any)
|
||||
ExtendGinDataOutput func(err *ExErr, depth int, json map[string]any)
|
||||
}
|
||||
|
||||
var initialized = false
|
||||
|
||||
var pkgconfig = ErrorPackageConfig{
|
||||
ZeroLogErrTraces: true,
|
||||
ZeroLogAllTraces: false,
|
||||
RecursiveErrors: true,
|
||||
ExtendedGinOutput: false,
|
||||
ExtendGinOutput: func(err *ExErr, json map[string]any) {},
|
||||
ExtendGinDataOutput: func(err *ExErr, depth int, json map[string]any) {},
|
||||
ZeroLogErrTraces: true,
|
||||
ZeroLogAllTraces: false,
|
||||
RecursiveErrors: true,
|
||||
ExtendedGinOutput: false,
|
||||
IncludeMetaInGinOutput: true,
|
||||
ExtendGinOutput: func(err *ExErr, json map[string]any) {},
|
||||
ExtendGinDataOutput: func(err *ExErr, depth int, json map[string]any) {},
|
||||
}
|
||||
|
||||
// Init initializes the exerr packages
|
||||
@@ -54,12 +56,13 @@ func Init(cfg ErrorPackageConfigInit) {
|
||||
}
|
||||
|
||||
pkgconfig = ErrorPackageConfig{
|
||||
ZeroLogErrTraces: cfg.ZeroLogErrTraces,
|
||||
ZeroLogAllTraces: cfg.ZeroLogAllTraces,
|
||||
RecursiveErrors: cfg.RecursiveErrors,
|
||||
ExtendedGinOutput: cfg.ExtendedGinOutput,
|
||||
ExtendGinOutput: ego,
|
||||
ExtendGinDataOutput: egdo,
|
||||
ZeroLogErrTraces: cfg.ZeroLogErrTraces,
|
||||
ZeroLogAllTraces: cfg.ZeroLogAllTraces,
|
||||
RecursiveErrors: cfg.RecursiveErrors,
|
||||
ExtendedGinOutput: cfg.ExtendedGinOutput,
|
||||
IncludeMetaInGinOutput: cfg.IncludeMetaInGinOutput,
|
||||
ExtendGinOutput: ego,
|
||||
ExtendGinDataOutput: egdo,
|
||||
}
|
||||
|
||||
initialized = true
|
||||
|
Reference in New Issue
Block a user