update linter
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing

This commit is contained in:
andrey1s
2021-09-19 20:15:01 +03:00
parent 0df834f4ab
commit 4323f5e3b3
12 changed files with 232 additions and 102 deletions

View File

@@ -13,9 +13,9 @@ const (
type Option func(*Entry)
func WithCapacity(cap int) Option {
func WithCapacity(c int) Option {
return func(e *Entry) {
e.fields = make(field.Fields, 0, cap+1)
e.fields = make(field.Fields, 0, c+1)
}
}
@@ -41,6 +41,7 @@ func New(opts ...Option) *Entry {
e := &Entry{
fields: make(field.Fields, 0, defaultCap+1),
level: level.Debug,
msg: "",
}
for _, opt := range opts {

View File

@@ -9,6 +9,7 @@ var pool = sync.Pool{
},
}
//nolint: forcetypeassert
func Get() *Entry {
e := pool.Get().(*Entry)
e.Reset()