add lint action (#19)
All checks were successful
Go Action / goaction (push) Successful in 19m15s

Reviewed-on: #19
This commit was merged in pull request #19.
This commit is contained in:
2025-12-23 22:01:14 +03:00
parent 859a8d88f7
commit 9f8f38e43f
20 changed files with 370 additions and 320 deletions

View File

@@ -62,7 +62,7 @@ func WithLevel(key string, lvl level.Level) Middleware {
}
// KeyValue add field by const key value.
func KeyValue(key string, value interface{}) Middleware {
func KeyValue(key string, value any) Middleware {
return func(ctx context.Context, e *entry.Entry, handler Logger) (int, error) {
return handler(ctx, e.AddAny(key, value))
}
@@ -75,7 +75,7 @@ func GoVersion(key string) Middleware {
}
}
// WithContext add field by context key.
// WithContextValue add field by context key.
func WithContextValue(keys ...fmt.Stringer) Middleware {
return func(ctx context.Context, e *entry.Entry, handler Logger) (int, error) {
for _, key := range keys {
@@ -93,6 +93,7 @@ func WithName(name string) Middleware {
}
// WithCaller adds called file.
//
// Deprecated: use WithSource.
func WithCaller(key string, depth int, full bool) Middleware {
const offset = 2