From 5d07a94b160ce36662c5f81788e2f3d0fc27d884 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=8B=89=E5=B0=8F=E8=BD=B0?= <67250607+laxiaohong@users.noreply.github.com> Date: Sun, 18 Jul 2021 15:01:08 +0800 Subject: [PATCH] use "and" replace "sub" (#1207) --- log/std.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/log/std.go b/log/std.go index ef9c14a17..1aab1929f 100644 --- a/log/std.go +++ b/log/std.go @@ -32,7 +32,7 @@ func (l *stdLogger) Log(level Level, keyvals ...interface{}) error { if len(keyvals) == 0 { return nil } - if len(keyvals)%2 != 0 { + if (len(keyvals) & 1) == 1 { keyvals = append(keyvals, "KEYVALS UNPAIRED") } buf := l.pool.Get().(*bytes.Buffer)