summaryrefslogtreecommitdiff
path: root/tests/mocks/mock_log.go
diff options
context:
space:
mode:
authorValery Piashchynski <[email protected]>2021-03-28 21:24:12 +0300
committerValery Piashchynski <[email protected]>2021-03-29 13:33:06 +0300
commit5a6c8b22148d7e97d20cf94d4978557cf0faec37 (patch)
treefebd9dc96d3cc892fe8a83471fc1e888b5c2d4d2 /tests/mocks/mock_log.go
parent92c5ee7ec150f48362fe839a73da9ec5fd646eb9 (diff)
- Fix new linters warningsv2.0.3
Signed-off-by: Valery Piashchynski <[email protected]>
Diffstat (limited to 'tests/mocks/mock_log.go')
-rw-r--r--tests/mocks/mock_log.go20
1 files changed, 5 insertions, 15 deletions
diff --git a/tests/mocks/mock_log.go b/tests/mocks/mock_log.go
index 66c70b91..ad70f9c0 100644
--- a/tests/mocks/mock_log.go
+++ b/tests/mocks/mock_log.go
@@ -44,9 +44,7 @@ func (m *MockLogger) Debug(msg string, keyvals ...interface{}) {
defer m.Unlock()
m.ctrl.T.Helper()
varargs := []interface{}{msg}
- for _, a := range keyvals {
- varargs = append(varargs, a)
- }
+ varargs = append(varargs, keyvals...)
m.ctrl.Call(m, "Debug", varargs...)
}
@@ -56,9 +54,7 @@ func (m *MockLogger) Warn(msg string, keyvals ...interface{}) {
defer m.Unlock()
m.ctrl.T.Helper()
varargs := []interface{}{msg}
- for _, a := range keyvals {
- varargs = append(varargs, a)
- }
+ varargs = append(varargs, keyvals...)
m.ctrl.Call(m, "Warn", varargs...)
}
@@ -68,9 +64,7 @@ func (m *MockLogger) Info(msg string, keyvals ...interface{}) {
defer m.Unlock()
m.ctrl.T.Helper()
varargs := []interface{}{msg}
- for _, a := range keyvals {
- varargs = append(varargs, a)
- }
+ varargs = append(varargs, keyvals...)
m.ctrl.Call(m, "Info", varargs...)
}
@@ -80,9 +74,7 @@ func (m *MockLogger) Error(msg string, keyvals ...interface{}) {
defer m.Unlock()
m.ctrl.T.Helper()
varargs := []interface{}{msg}
- for _, a := range keyvals {
- varargs = append(varargs, a)
- }
+ varargs = append(varargs, keyvals...)
m.ctrl.Call(m, "Error", varargs...)
}
@@ -145,9 +137,7 @@ func (m *MockWithLogger) EXPECT() *MockWithLoggerMockRecorder {
func (m *MockWithLogger) With(keyvals ...interface{}) logger.Logger {
m.ctrl.T.Helper()
varargs := []interface{}{}
- for _, a := range keyvals {
- varargs = append(varargs, a)
- }
+ varargs = append(varargs, keyvals...)
ret := m.ctrl.Call(m, "With", varargs...)
ret0, _ := ret[0].(logger.Logger)
return ret0