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

@@ -32,7 +32,7 @@ func WithMessage(msg string) Option {
}
}
func WithMessagef(format string, args ...interface{}) Option {
func WithMessagef(format string, args ...any) Option {
return func(e *Entry) {
e.format = format
e.args = args
@@ -50,7 +50,7 @@ func New(opts ...Option) *Entry {
fields: make(field.Fields, 0, defaultCap+1),
level: level.Debug,
format: "",
args: make([]interface{}, 0, defaultCap+1),
args: make([]any, 0, defaultCap+1),
}
for _, opt := range opts {
@@ -63,7 +63,7 @@ func New(opts ...Option) *Entry {
// Entry slice field.
type Entry struct {
format string
args []interface{}
args []any
level level.Level
fields field.Fields
}
@@ -133,7 +133,7 @@ func (e *Entry) SetMessage(msg string) *Entry {
return e
}
func (e *Entry) SetMessagef(format string, args ...interface{}) *Entry {
func (e *Entry) SetMessagef(format string, args ...any) *Entry {
if e == nil {
return New().SetMessagef(format, args...)
}
@@ -154,7 +154,7 @@ func (e *Entry) Add(fields ...field.Field) *Entry {
return e
}
func (e *Entry) AddAny(key string, value interface{}) *Entry {
func (e *Entry) AddAny(key string, value any) *Entry {
return e.Add(field.Any(key, value))
}