mirror of
https://github.com/drakkan/sftpgo.git
synced 2025-12-07 06:40:54 +03:00
micro optimizations spotted using the go-critic linter
This commit is contained in:
@@ -69,7 +69,7 @@ func (l *LeveledLogger) addKeysAndValues(ev *zerolog.Event, keysAndValues ...int
|
||||
extra := keysAndValues[kvLen-1]
|
||||
keysAndValues = append(keysAndValues[:kvLen-1], "EXTRA_VALUE_AT_END", extra)
|
||||
}
|
||||
for i := 0; i < len(keysAndValues); i = i + 2 {
|
||||
for i := 0; i < len(keysAndValues); i += 2 {
|
||||
key, val := keysAndValues[i], keysAndValues[i+1]
|
||||
if keyStr, ok := key.(string); ok {
|
||||
ev.Str(keyStr, fmt.Sprintf("%v", val))
|
||||
|
||||
Reference in New Issue
Block a user