From 71f288e8259e61e37d5e7da2b598854018ae4c52 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 18 Oct 2024 19:25:43 +0000 Subject: [PATCH 1/2] go.mod: bump go.uber.org/mock from 0.4.0 to 0.5.0 Bumps [go.uber.org/mock](https://github.com/uber/mock) from 0.4.0 to 0.5.0. - [Release notes](https://github.com/uber/mock/releases) - [Changelog](https://github.com/uber-go/mock/blob/main/CHANGELOG.md) - [Commits](https://github.com/uber/mock/compare/v0.4.0...v0.5.0) --- updated-dependencies: - dependency-name: go.uber.org/mock dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 750b347..366b929 100644 --- a/go.mod +++ b/go.mod @@ -17,7 +17,7 @@ require ( github.com/rs/zerolog v1.33.0 github.com/twmb/go-cache v1.2.1 go.uber.org/goleak v1.3.0 - go.uber.org/mock v0.4.0 + go.uber.org/mock v0.5.0 golang.org/x/exp v0.0.0-20241004190924-225e2abe05e6 golang.org/x/tools v0.26.0 google.golang.org/protobuf v1.35.1 diff --git a/go.sum b/go.sum index b30fec0..a74d523 100644 --- a/go.sum +++ b/go.sum @@ -699,8 +699,8 @@ go.uber.org/automaxprocs v1.5.3 h1:kWazyxZUrS3Gs4qUpbwo5kEIMGe/DAvi5Z4tl2NW4j8= go.uber.org/automaxprocs v1.5.3/go.mod h1:eRbA25aqJrxAbsLO0xy5jVwPt7FQnRgjW+efnwa1WM0= go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= -go.uber.org/mock v0.4.0 h1:VcM4ZOtdbR4f6VXfiOpwpVJDL6lCReaZ6mw31wqh7KU= -go.uber.org/mock v0.4.0/go.mod h1:a6FSlNadKUHUa9IP5Vyt1zh4fC7uAwxMutEAscFbkZc= +go.uber.org/mock v0.5.0 h1:KAMbZvZPyBPWgD14IrIQ38QCyjwpvVVV6K/bHl1IwQU= +go.uber.org/mock v0.5.0/go.mod h1:ge71pBPLYDk7QIi1LupWxdAykm7KIEFchiOqd6z7qMM= go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= From ccbb39f86171ec518a6e83146f44f4e096beb218 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lovro=20Ma=C5=BEgon?= Date: Mon, 21 Oct 2024 13:15:14 +0200 Subject: [PATCH 2/2] make generate --- database/mock/database.go | 33 +++++++++++++++++---------------- 1 file changed, 17 insertions(+), 16 deletions(-) diff --git a/database/mock/database.go b/database/mock/database.go index f472787..5b759f0 100644 --- a/database/mock/database.go +++ b/database/mock/database.go @@ -21,6 +21,7 @@ import ( type DB struct { ctrl *gomock.Controller recorder *DBMockRecorder + isgomock struct{} } // DBMockRecorder is the mock recorder for DB. @@ -79,18 +80,18 @@ func (c *DBCloseCall) DoAndReturn(f func() error) *DBCloseCall { } // Get mocks base method. -func (m *DB) Get(arg0 context.Context, arg1 string) ([]byte, error) { +func (m *DB) Get(ctx context.Context, key string) ([]byte, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Get", arg0, arg1) + ret := m.ctrl.Call(m, "Get", ctx, key) ret0, _ := ret[0].([]byte) ret1, _ := ret[1].(error) return ret0, ret1 } // Get indicates an expected call of Get. -func (mr *DBMockRecorder) Get(arg0, arg1 any) *DBGetCall { +func (mr *DBMockRecorder) Get(ctx, key any) *DBGetCall { mr.mock.ctrl.T.Helper() - call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*DB)(nil).Get), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*DB)(nil).Get), ctx, key) return &DBGetCall{Call: call} } @@ -118,18 +119,18 @@ func (c *DBGetCall) DoAndReturn(f func(context.Context, string) ([]byte, error)) } // GetKeys mocks base method. -func (m *DB) GetKeys(arg0 context.Context, arg1 string) ([]string, error) { +func (m *DB) GetKeys(ctx context.Context, prefix string) ([]string, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetKeys", arg0, arg1) + ret := m.ctrl.Call(m, "GetKeys", ctx, prefix) ret0, _ := ret[0].([]string) ret1, _ := ret[1].(error) return ret0, ret1 } // GetKeys indicates an expected call of GetKeys. -func (mr *DBMockRecorder) GetKeys(arg0, arg1 any) *DBGetKeysCall { +func (mr *DBMockRecorder) GetKeys(ctx, prefix any) *DBGetKeysCall { mr.mock.ctrl.T.Helper() - call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetKeys", reflect.TypeOf((*DB)(nil).GetKeys), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetKeys", reflect.TypeOf((*DB)(nil).GetKeys), ctx, prefix) return &DBGetKeysCall{Call: call} } @@ -157,9 +158,9 @@ func (c *DBGetKeysCall) DoAndReturn(f func(context.Context, string) ([]string, e } // NewTransaction mocks base method. -func (m *DB) NewTransaction(arg0 context.Context, arg1 bool) (database.Transaction, context.Context, error) { +func (m *DB) NewTransaction(ctx context.Context, update bool) (database.Transaction, context.Context, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "NewTransaction", arg0, arg1) + ret := m.ctrl.Call(m, "NewTransaction", ctx, update) ret0, _ := ret[0].(database.Transaction) ret1, _ := ret[1].(context.Context) ret2, _ := ret[2].(error) @@ -167,9 +168,9 @@ func (m *DB) NewTransaction(arg0 context.Context, arg1 bool) (database.Transacti } // NewTransaction indicates an expected call of NewTransaction. -func (mr *DBMockRecorder) NewTransaction(arg0, arg1 any) *DBNewTransactionCall { +func (mr *DBMockRecorder) NewTransaction(ctx, update any) *DBNewTransactionCall { mr.mock.ctrl.T.Helper() - call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NewTransaction", reflect.TypeOf((*DB)(nil).NewTransaction), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NewTransaction", reflect.TypeOf((*DB)(nil).NewTransaction), ctx, update) return &DBNewTransactionCall{Call: call} } @@ -235,17 +236,17 @@ func (c *DBPingCall) DoAndReturn(f func(context.Context) error) *DBPingCall { } // Set mocks base method. -func (m *DB) Set(arg0 context.Context, arg1 string, arg2 []byte) error { +func (m *DB) Set(ctx context.Context, key string, value []byte) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Set", arg0, arg1, arg2) + ret := m.ctrl.Call(m, "Set", ctx, key, value) ret0, _ := ret[0].(error) return ret0 } // Set indicates an expected call of Set. -func (mr *DBMockRecorder) Set(arg0, arg1, arg2 any) *DBSetCall { +func (mr *DBMockRecorder) Set(ctx, key, value any) *DBSetCall { mr.mock.ctrl.T.Helper() - call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Set", reflect.TypeOf((*DB)(nil).Set), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Set", reflect.TypeOf((*DB)(nil).Set), ctx, key, value) return &DBSetCall{Call: call} }