summaryrefslogtreecommitdiff
path: root/tests/mocks/mock_log.go
diff options
context:
space:
mode:
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