lint
All checks were successful
pr / test (pull_request) Successful in 2m22s
lint / lint (pull_request) Successful in 10m12s

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
2024-03-09 23:33:19 +03:00
parent cf877845a1
commit c548064225
17 changed files with 187 additions and 147 deletions

View File

@@ -18,18 +18,12 @@ type Options struct {
Out io.Writer
// Context holds exernal options
Context context.Context
// Attrs holds additional attributes
Attrs []interface{}
// Name holds the logger name
Name string
// The logging level the logger should log
Level Level
// CallerSkipCount number of frmaes to skip
CallerSkipCount int
// ContextAttrFuncs contains funcs that executed before log func on context
ContextAttrFuncs []ContextAttrFunc
// TimeFunc used to obtain current time
TimeFunc func() time.Time
// TimeKey is the key used for the time of the log call
TimeKey string
// Name holds the logger name
Name string
// LevelKey is the key used for the level of the log call
LevelKey string
// MessageKey is the key used for the message of the log call
@@ -40,12 +34,18 @@ type Options struct {
SourceKey string
// StacktraceKey is the key used for the stacktrace
StacktraceKey string
// Attrs holds additional attributes
Attrs []interface{}
// ContextAttrFuncs contains funcs that executed before log func on context
ContextAttrFuncs []ContextAttrFunc
// CallerSkipCount number of frmaes to skip
CallerSkipCount int
// The logging level the logger should log
Level Level
// AddStacktrace controls writing of stacktaces on error
AddStacktrace bool
// AddSource enabled writing source file and position in log
AddSource bool
// TimeFunc used to obtain current time
TimeFunc func() time.Time
}
// NewOptions creates new options struct

View File

@@ -56,9 +56,9 @@ type Wrapper struct {
s fmt.State
pointers map[uintptr]int
opts *Options
takeMap map[int]bool
depth int
ignoreNextType bool
takeMap map[int]bool
protoWrapperType bool
sqlWrapperType bool
}