summaryrefslogtreecommitdiff
path: root/plugins/logger
diff options
context:
space:
mode:
authorValery Piashchynski <[email protected]>2021-03-28 14:00:54 +0300
committerValery Piashchynski <[email protected]>2021-03-28 14:00:54 +0300
commit2a58b1be2c79f2fe10c0a429878937661645a928 (patch)
treef3a7cd472c75c4dd2a97bcf97cb154731ed81230 /plugins/logger
parent970014530a23d57a3be41c6369ac6456d0b36ae1 (diff)
- Fix bug with the worker reallocating during the response
- Update .golangci and fix new warnings Signed-off-by: Valery Piashchynski <[email protected]>
Diffstat (limited to 'plugins/logger')
-rw-r--r--plugins/logger/zap_adapter.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/logger/zap_adapter.go b/plugins/logger/zap_adapter.go
index 0a0855b8..6d865519 100644
--- a/plugins/logger/zap_adapter.go
+++ b/plugins/logger/zap_adapter.go
@@ -23,7 +23,7 @@ func (log *ZapAdapter) fields(keyvals []interface{}) []zap.Field {
return []zap.Field{zap.Error(fmt.Errorf("odd number of keyvals pairs: %v", keyvals))}
}
- var fields []zap.Field
+ fields := make([]zap.Field, 0, len(keyvals)/2)
for i := 0; i < len(keyvals); i += 2 {
key, ok := keyvals[i].(string)
if !ok {