diff --git a/go.mod b/go.mod index 66cc102e..8fd284ee 100644 --- a/go.mod +++ b/go.mod @@ -5,7 +5,6 @@ go 1.22.3 require ( entgo.io/ent v0.14.0 github.com/go-sql-driver/mysql v1.8.1 - github.com/golang/mock v1.6.0 github.com/google/uuid v1.6.0 github.com/gorilla/sessions v1.2.2 github.com/labstack/echo-contrib v0.17.1 @@ -13,6 +12,7 @@ require ( github.com/ncw/swift v1.0.53 github.com/samber/lo v1.42.0 github.com/stretchr/testify v1.9.0 + go.uber.org/mock v0.4.0 go.uber.org/zap v1.27.0 ) diff --git a/go.sum b/go.sum index d1cc9f9a..80d2b461 100644 --- a/go.sum +++ b/go.sum @@ -20,8 +20,6 @@ github.com/go-test/deep v1.0.3 h1:ZrJSEWsXzPOxaZnFteGEfooLba+ju3FYIbOrS+rQd68= github.com/go-test/deep v1.0.3/go.mod h1:wGDj63lr65AM2AQyKZd/NYHGb0R+1RLqB8NKt3aSFNA= github.com/golang-jwt/jwt v3.2.2+incompatible h1:IfV12K8xAKAnZqdXVzCZ+TOjboZ2keLg81eXfW3O+oY= github.com/golang-jwt/jwt v3.2.2+incompatible/go.mod h1:8pz2t5EyA70fFQQSrl6XZXzqecmYZeUEB8OUGHkxJ+I= -github.com/golang/mock v1.6.0 h1:ErTB+efbowRARo13NNdxyJji2egdxLGQhRaY+DUumQc= -github.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= @@ -53,71 +51,62 @@ github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovk github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= +github.com/mattn/go-runewidth v0.0.9 h1:Lm995f3rfxdpd6TSmuVCHVb/QhupuXlYr8sCI/QdE+0= +github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= github.com/mattn/go-sqlite3 v1.14.16 h1:yOQRA0RpS5PFz/oikGwBEqvAWhWg5ufRz4ETLjwpU1Y= github.com/mattn/go-sqlite3 v1.14.16/go.mod h1:2eHXhiwb8IkHr+BDWZGa96P6+rkvnG63S2DGjv9HUNg= github.com/mitchellh/go-wordwrap v1.0.1 h1:TLuKupo69TCn6TQSyGxwI1EblZZEsQ0vMlAFQflz0v0= github.com/mitchellh/go-wordwrap v1.0.1/go.mod h1:R62XHJLzvMFRBbcrT7m7WgmE1eOyTSsCt+hzestvNj0= github.com/ncw/swift v1.0.53 h1:luHjjTNtekIEvHg5KdAFIBaH7bWfNkefwFnpDffSIks= github.com/ncw/swift v1.0.53/go.mod h1:23YIA4yWVnGwv2dQlN4bB7egfYX6YLn0Yo/S6zZO/ZM= +github.com/olekukonko/tablewriter v0.0.5 h1:P2Ga83D34wi1o9J6Wh1mRuqd4mF/x/lgBS7N7AbDhec= +github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6HuIJcUGPhkA7kY= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/samber/lo v1.42.0 h1:cuVp/4oZcTxK0w8vyj/MSEws9yTUjuTgZi7noEXMlZs= github.com/samber/lo v1.42.0/go.mod h1:w7R6fO7h2lrnx/s0bWcZ55vXJI89p5UPM6+kyDL373E= github.com/sergi/go-diff v1.0.0 h1:Kpca3qRNrduNnOQeazBd0ysaKrUJiIuISHxogkT9RPQ= github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= +github.com/spf13/cobra v1.7.0 h1:hyqWnYt1ZQShIddO5kBpj3vu05/++x6tJ6dg8EC572I= +github.com/spf13/cobra v1.7.0/go.mod h1:uLxZILRyS/50WlhOIKD7W6V5bgeIt+4sICxh6uRMrb0= +github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= +github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/valyala/bytebufferpool v1.0.0 h1:GqA5TC/0021Y/b9FG4Oi9Mr3q7XYx6KllzawFIhcdPw= github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= github.com/valyala/fasttemplate v1.2.2 h1:lxLXG0uE3Qnshl9QyaK6XJxMXlQZELvChBOCmQD0Loo= github.com/valyala/fasttemplate v1.2.2/go.mod h1:KHLXt3tVN2HBp8eijSv/kGJopbvo7S+qRAEEKiv+SiQ= -github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= github.com/zclconf/go-cty v1.11.0 h1:726SxLdi2SDnjY+BStqB9J1hNp4+2WlzyXLuimibIe0= github.com/zclconf/go-cty v1.11.0/go.mod h1:s9IfD1LK5ccNMSWCVFCE2rJfHiZgi7JijgeWIMfhLvA= 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/multierr v1.10.0 h1:S0h4aNzvfcFsC3dRF1jLoaov7oRaKqRGC/pUEJ2yvPQ= go.uber.org/multierr v1.10.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= -golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.22.0 h1:g1v0xeRhjcugydODzvb3mEM9SQ0HGp9s/nh3COQ/C30= golang.org/x/crypto v0.22.0/go.mod h1:vr6Su+7cTlO45qkww3VDJlzDn0ctJvRgYbC2NvXHt+M= golang.org/x/exp v0.0.0-20220303212507-bbda1eaf7a17 h1:3MTrJm4PyNL9NBqvYDSj3DHl46qQakyfqfWo4jgfaEM= golang.org/x/exp v0.0.0-20220303212507-bbda1eaf7a17/go.mod h1:lgLbSvA5ygNOMpwM/9anMpWVlVJ7Z+cHWq/eFuinpGE= -golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.17.0 h1:zY54UmvipHiNd+pm+m0x9KhZ9hl1/7QNMyxXbc6ICqA= golang.org/x/mod v0.17.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= -golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= golang.org/x/net v0.24.0 h1:1PcaxkF854Fu3+lvBIx5SYn9wRlBzzcnHZSiaFFAb0w= golang.org/x/net v0.24.0/go.mod h1:2Q7sJY5mzlzWjKtYUEXSlBWCdyaioyXzRB2RtU8KVE8= -golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sync v0.7.0 h1:YsImfSBoP9QPYL0xyKJPq0gcaJdG3rInoqxTWbfQu9M= +golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o= golang.org/x/sys v0.19.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.16.0 h1:a94ExnEXNtEwYLGJSIUxnWoxoRz/ZcCsV63ROupILh4= golang.org/x/text v0.16.0/go.mod h1:GhwF1Be+LQoKShO3cGOHzqOgRrGaYc9AvblQOmPVHnI= golang.org/x/time v0.5.0 h1:o7cqy6amK/52YcAKIPlM3a+Fpj35zvRj2TP+e1xFSfk= golang.org/x/time v0.5.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= -golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d h1:vU5i/LfpvrRCpgM/VPfJLg5KjxD3E+hfT1SH+d9zLwg= +golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d/go.mod h1:aiJjzUbINMkxbQROHiO6hDPo2LHcIPhhQsa9DLh0yGk= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= diff --git a/model/mock_model/mock_admin.go b/model/mock_model/mock_admin.go index 16ba8309..3a013220 100644 --- a/model/mock_model/mock_admin.go +++ b/model/mock_model/mock_admin.go @@ -1,5 +1,10 @@ // Code generated by MockGen. DO NOT EDIT. // Source: admin.go +// +// Generated by this command: +// +// mockgen -source=admin.go -destination=mock_model/mock_admin.go -package=mock_model +// // Package mock_model is a generated GoMock package. package mock_model @@ -8,9 +13,9 @@ import ( context "context" reflect "reflect" - gomock "github.com/golang/mock/gomock" uuid "github.com/google/uuid" model "github.com/traPtitech/Jomon/model" + gomock "go.uber.org/mock/gomock" ) // MockAdminRepository is a mock of AdminRepository interface. @@ -45,7 +50,7 @@ func (m *MockAdminRepository) AddAdmins(ctx context.Context, userIDs []uuid.UUID } // AddAdmins indicates an expected call of AddAdmins. -func (mr *MockAdminRepositoryMockRecorder) AddAdmins(ctx, userIDs interface{}) *gomock.Call { +func (mr *MockAdminRepositoryMockRecorder) AddAdmins(ctx, userIDs any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddAdmins", reflect.TypeOf((*MockAdminRepository)(nil).AddAdmins), ctx, userIDs) } @@ -59,7 +64,7 @@ func (m *MockAdminRepository) DeleteAdmins(ctx context.Context, userIDs []uuid.U } // DeleteAdmins indicates an expected call of DeleteAdmins. -func (mr *MockAdminRepositoryMockRecorder) DeleteAdmins(ctx, userIDs interface{}) *gomock.Call { +func (mr *MockAdminRepositoryMockRecorder) DeleteAdmins(ctx, userIDs any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteAdmins", reflect.TypeOf((*MockAdminRepository)(nil).DeleteAdmins), ctx, userIDs) } @@ -74,7 +79,7 @@ func (m *MockAdminRepository) GetAdmins(ctx context.Context) ([]*model.Admin, er } // GetAdmins indicates an expected call of GetAdmins. -func (mr *MockAdminRepositoryMockRecorder) GetAdmins(ctx interface{}) *gomock.Call { +func (mr *MockAdminRepositoryMockRecorder) GetAdmins(ctx any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAdmins", reflect.TypeOf((*MockAdminRepository)(nil).GetAdmins), ctx) } diff --git a/model/mock_model/mock_comment.go b/model/mock_model/mock_comment.go index c43dc23f..3b450e9c 100644 --- a/model/mock_model/mock_comment.go +++ b/model/mock_model/mock_comment.go @@ -1,5 +1,10 @@ // Code generated by MockGen. DO NOT EDIT. // Source: comment.go +// +// Generated by this command: +// +// mockgen -source=comment.go -destination=mock_model/mock_comment.go -package=mock_model +// // Package mock_model is a generated GoMock package. package mock_model @@ -8,9 +13,9 @@ import ( context "context" reflect "reflect" - gomock "github.com/golang/mock/gomock" uuid "github.com/google/uuid" model "github.com/traPtitech/Jomon/model" + gomock "go.uber.org/mock/gomock" ) // MockCommentRepository is a mock of CommentRepository interface. @@ -46,7 +51,7 @@ func (m *MockCommentRepository) CreateComment(ctx context.Context, comment strin } // CreateComment indicates an expected call of CreateComment. -func (mr *MockCommentRepositoryMockRecorder) CreateComment(ctx, comment, requestID, userID interface{}) *gomock.Call { +func (mr *MockCommentRepositoryMockRecorder) CreateComment(ctx, comment, requestID, userID any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateComment", reflect.TypeOf((*MockCommentRepository)(nil).CreateComment), ctx, comment, requestID, userID) } @@ -60,7 +65,7 @@ func (m *MockCommentRepository) DeleteComment(ctx context.Context, requestID, co } // DeleteComment indicates an expected call of DeleteComment. -func (mr *MockCommentRepositoryMockRecorder) DeleteComment(ctx, requestID, commentID interface{}) *gomock.Call { +func (mr *MockCommentRepositoryMockRecorder) DeleteComment(ctx, requestID, commentID any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteComment", reflect.TypeOf((*MockCommentRepository)(nil).DeleteComment), ctx, requestID, commentID) } @@ -75,7 +80,7 @@ func (m *MockCommentRepository) GetComments(ctx context.Context, requestID uuid. } // GetComments indicates an expected call of GetComments. -func (mr *MockCommentRepositoryMockRecorder) GetComments(ctx, requestID interface{}) *gomock.Call { +func (mr *MockCommentRepositoryMockRecorder) GetComments(ctx, requestID any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetComments", reflect.TypeOf((*MockCommentRepository)(nil).GetComments), ctx, requestID) } @@ -90,7 +95,7 @@ func (m *MockCommentRepository) UpdateComment(ctx context.Context, comment strin } // UpdateComment indicates an expected call of UpdateComment. -func (mr *MockCommentRepositoryMockRecorder) UpdateComment(ctx, comment, requestID, commentID interface{}) *gomock.Call { +func (mr *MockCommentRepositoryMockRecorder) UpdateComment(ctx, comment, requestID, commentID any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateComment", reflect.TypeOf((*MockCommentRepository)(nil).UpdateComment), ctx, comment, requestID, commentID) } diff --git a/model/mock_model/mock_file.go b/model/mock_model/mock_file.go index d481d6c5..3660c3af 100644 --- a/model/mock_model/mock_file.go +++ b/model/mock_model/mock_file.go @@ -1,5 +1,10 @@ // Code generated by MockGen. DO NOT EDIT. // Source: file.go +// +// Generated by this command: +// +// mockgen -source=file.go -destination=mock_model/mock_file.go -package=mock_model +// // Package mock_model is a generated GoMock package. package mock_model @@ -8,9 +13,9 @@ import ( context "context" reflect "reflect" - gomock "github.com/golang/mock/gomock" uuid "github.com/google/uuid" model "github.com/traPtitech/Jomon/model" + gomock "go.uber.org/mock/gomock" ) // MockFileRepository is a mock of FileRepository interface. @@ -46,7 +51,7 @@ func (m *MockFileRepository) CreateFile(ctx context.Context, name, mimetype stri } // CreateFile indicates an expected call of CreateFile. -func (mr *MockFileRepositoryMockRecorder) CreateFile(ctx, name, mimetype, requestID, userID interface{}) *gomock.Call { +func (mr *MockFileRepositoryMockRecorder) CreateFile(ctx, name, mimetype, requestID, userID any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateFile", reflect.TypeOf((*MockFileRepository)(nil).CreateFile), ctx, name, mimetype, requestID, userID) } @@ -60,7 +65,7 @@ func (m *MockFileRepository) DeleteFile(ctx context.Context, fileID uuid.UUID) e } // DeleteFile indicates an expected call of DeleteFile. -func (mr *MockFileRepositoryMockRecorder) DeleteFile(ctx, fileID interface{}) *gomock.Call { +func (mr *MockFileRepositoryMockRecorder) DeleteFile(ctx, fileID any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteFile", reflect.TypeOf((*MockFileRepository)(nil).DeleteFile), ctx, fileID) } @@ -75,7 +80,7 @@ func (m *MockFileRepository) GetFile(ctx context.Context, fileID uuid.UUID) (*mo } // GetFile indicates an expected call of GetFile. -func (mr *MockFileRepositoryMockRecorder) GetFile(ctx, fileID interface{}) *gomock.Call { +func (mr *MockFileRepositoryMockRecorder) GetFile(ctx, fileID any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetFile", reflect.TypeOf((*MockFileRepository)(nil).GetFile), ctx, fileID) } diff --git a/model/mock_model/mock_group.go b/model/mock_model/mock_group.go index eab89931..f4174a23 100644 --- a/model/mock_model/mock_group.go +++ b/model/mock_model/mock_group.go @@ -1,5 +1,10 @@ // Code generated by MockGen. DO NOT EDIT. // Source: group.go +// +// Generated by this command: +// +// mockgen -source=group.go -destination=mock_model/mock_group.go -package=mock_model +// // Package mock_model is a generated GoMock package. package mock_model @@ -8,9 +13,9 @@ import ( context "context" reflect "reflect" - gomock "github.com/golang/mock/gomock" uuid "github.com/google/uuid" model "github.com/traPtitech/Jomon/model" + gomock "go.uber.org/mock/gomock" ) // MockGroupRepository is a mock of GroupRepository interface. @@ -46,7 +51,7 @@ func (m *MockGroupRepository) AddMembers(ctx context.Context, groupID uuid.UUID, } // AddMembers indicates an expected call of AddMembers. -func (mr *MockGroupRepositoryMockRecorder) AddMembers(ctx, groupID, userIDs interface{}) *gomock.Call { +func (mr *MockGroupRepositoryMockRecorder) AddMembers(ctx, groupID, userIDs any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddMembers", reflect.TypeOf((*MockGroupRepository)(nil).AddMembers), ctx, groupID, userIDs) } @@ -61,7 +66,7 @@ func (m *MockGroupRepository) AddOwners(ctx context.Context, groupID uuid.UUID, } // AddOwners indicates an expected call of AddOwners. -func (mr *MockGroupRepositoryMockRecorder) AddOwners(ctx, groupID, ownerIDs interface{}) *gomock.Call { +func (mr *MockGroupRepositoryMockRecorder) AddOwners(ctx, groupID, ownerIDs any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddOwners", reflect.TypeOf((*MockGroupRepository)(nil).AddOwners), ctx, groupID, ownerIDs) } @@ -76,7 +81,7 @@ func (m *MockGroupRepository) CreateGroup(ctx context.Context, name, description } // CreateGroup indicates an expected call of CreateGroup. -func (mr *MockGroupRepositoryMockRecorder) CreateGroup(ctx, name, description, budget interface{}) *gomock.Call { +func (mr *MockGroupRepositoryMockRecorder) CreateGroup(ctx, name, description, budget any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateGroup", reflect.TypeOf((*MockGroupRepository)(nil).CreateGroup), ctx, name, description, budget) } @@ -90,7 +95,7 @@ func (m *MockGroupRepository) DeleteGroup(ctx context.Context, groupID uuid.UUID } // DeleteGroup indicates an expected call of DeleteGroup. -func (mr *MockGroupRepositoryMockRecorder) DeleteGroup(ctx, groupID interface{}) *gomock.Call { +func (mr *MockGroupRepositoryMockRecorder) DeleteGroup(ctx, groupID any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteGroup", reflect.TypeOf((*MockGroupRepository)(nil).DeleteGroup), ctx, groupID) } @@ -104,7 +109,7 @@ func (m *MockGroupRepository) DeleteMembers(ctx context.Context, groupID uuid.UU } // DeleteMembers indicates an expected call of DeleteMembers. -func (mr *MockGroupRepositoryMockRecorder) DeleteMembers(ctx, groupID, userIDs interface{}) *gomock.Call { +func (mr *MockGroupRepositoryMockRecorder) DeleteMembers(ctx, groupID, userIDs any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteMembers", reflect.TypeOf((*MockGroupRepository)(nil).DeleteMembers), ctx, groupID, userIDs) } @@ -118,7 +123,7 @@ func (m *MockGroupRepository) DeleteOwners(ctx context.Context, groupID uuid.UUI } // DeleteOwners indicates an expected call of DeleteOwners. -func (mr *MockGroupRepositoryMockRecorder) DeleteOwners(ctx, groupID, ownerIDs interface{}) *gomock.Call { +func (mr *MockGroupRepositoryMockRecorder) DeleteOwners(ctx, groupID, ownerIDs any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteOwners", reflect.TypeOf((*MockGroupRepository)(nil).DeleteOwners), ctx, groupID, ownerIDs) } @@ -133,7 +138,7 @@ func (m *MockGroupRepository) GetGroup(ctx context.Context, groupID uuid.UUID) ( } // GetGroup indicates an expected call of GetGroup. -func (mr *MockGroupRepositoryMockRecorder) GetGroup(ctx, groupID interface{}) *gomock.Call { +func (mr *MockGroupRepositoryMockRecorder) GetGroup(ctx, groupID any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetGroup", reflect.TypeOf((*MockGroupRepository)(nil).GetGroup), ctx, groupID) } @@ -148,7 +153,7 @@ func (m *MockGroupRepository) GetGroups(ctx context.Context) ([]*model.Group, er } // GetGroups indicates an expected call of GetGroups. -func (mr *MockGroupRepositoryMockRecorder) GetGroups(ctx interface{}) *gomock.Call { +func (mr *MockGroupRepositoryMockRecorder) GetGroups(ctx any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetGroups", reflect.TypeOf((*MockGroupRepository)(nil).GetGroups), ctx) } @@ -163,7 +168,7 @@ func (m *MockGroupRepository) GetMembers(ctx context.Context, groupID uuid.UUID) } // GetMembers indicates an expected call of GetMembers. -func (mr *MockGroupRepositoryMockRecorder) GetMembers(ctx, groupID interface{}) *gomock.Call { +func (mr *MockGroupRepositoryMockRecorder) GetMembers(ctx, groupID any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetMembers", reflect.TypeOf((*MockGroupRepository)(nil).GetMembers), ctx, groupID) } @@ -178,7 +183,7 @@ func (m *MockGroupRepository) GetOwners(ctx context.Context, groupID uuid.UUID) } // GetOwners indicates an expected call of GetOwners. -func (mr *MockGroupRepositoryMockRecorder) GetOwners(ctx, groupID interface{}) *gomock.Call { +func (mr *MockGroupRepositoryMockRecorder) GetOwners(ctx, groupID any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetOwners", reflect.TypeOf((*MockGroupRepository)(nil).GetOwners), ctx, groupID) } @@ -193,7 +198,7 @@ func (m *MockGroupRepository) UpdateGroup(ctx context.Context, groupID uuid.UUID } // UpdateGroup indicates an expected call of UpdateGroup. -func (mr *MockGroupRepositoryMockRecorder) UpdateGroup(ctx, groupID, name, description, budget interface{}) *gomock.Call { +func (mr *MockGroupRepositoryMockRecorder) UpdateGroup(ctx, groupID, name, description, budget any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateGroup", reflect.TypeOf((*MockGroupRepository)(nil).UpdateGroup), ctx, groupID, name, description, budget) } diff --git a/model/mock_model/mock_group_budget.go b/model/mock_model/mock_group_budget.go index 1c63ff8b..bef38220 100644 --- a/model/mock_model/mock_group_budget.go +++ b/model/mock_model/mock_group_budget.go @@ -1,11 +1,16 @@ // Code generated by MockGen. DO NOT EDIT. // Source: group_budget.go +// +// Generated by this command: +// +// mockgen -source=group_budget.go -destination=mock_model/mock_group_budget.go -package=mock_model +// // Package mock_model is a generated GoMock package. package mock_model import ( - gomock "github.com/golang/mock/gomock" + gomock "go.uber.org/mock/gomock" ) // MockGroupBudgetRepository is a mock of GroupBudgetRepository interface. diff --git a/model/mock_model/mock_request.go b/model/mock_model/mock_request.go index b3938ace..e4a40c79 100644 --- a/model/mock_model/mock_request.go +++ b/model/mock_model/mock_request.go @@ -1,5 +1,10 @@ // Code generated by MockGen. DO NOT EDIT. // Source: request.go +// +// Generated by this command: +// +// mockgen -source=request.go -destination=mock_model/mock_request.go -package=mock_model +// // Package mock_model is a generated GoMock package. package mock_model @@ -8,9 +13,9 @@ import ( context "context" reflect "reflect" - gomock "github.com/golang/mock/gomock" uuid "github.com/google/uuid" model "github.com/traPtitech/Jomon/model" + gomock "go.uber.org/mock/gomock" ) // MockRequestRepository is a mock of RequestRepository interface. @@ -46,7 +51,7 @@ func (m *MockRequestRepository) CreateRequest(ctx context.Context, title, conten } // CreateRequest indicates an expected call of CreateRequest. -func (mr *MockRequestRepositoryMockRecorder) CreateRequest(ctx, title, content, tags, targets, group, userID interface{}) *gomock.Call { +func (mr *MockRequestRepositoryMockRecorder) CreateRequest(ctx, title, content, tags, targets, group, userID any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateRequest", reflect.TypeOf((*MockRequestRepository)(nil).CreateRequest), ctx, title, content, tags, targets, group, userID) } @@ -61,7 +66,7 @@ func (m *MockRequestRepository) GetRequest(ctx context.Context, requestID uuid.U } // GetRequest indicates an expected call of GetRequest. -func (mr *MockRequestRepositoryMockRecorder) GetRequest(ctx, requestID interface{}) *gomock.Call { +func (mr *MockRequestRepositoryMockRecorder) GetRequest(ctx, requestID any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetRequest", reflect.TypeOf((*MockRequestRepository)(nil).GetRequest), ctx, requestID) } @@ -76,7 +81,7 @@ func (m *MockRequestRepository) GetRequests(ctx context.Context, query model.Req } // GetRequests indicates an expected call of GetRequests. -func (mr *MockRequestRepositoryMockRecorder) GetRequests(ctx, query interface{}) *gomock.Call { +func (mr *MockRequestRepositoryMockRecorder) GetRequests(ctx, query any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetRequests", reflect.TypeOf((*MockRequestRepository)(nil).GetRequests), ctx, query) } @@ -91,7 +96,7 @@ func (m *MockRequestRepository) UpdateRequest(ctx context.Context, requestID uui } // UpdateRequest indicates an expected call of UpdateRequest. -func (mr *MockRequestRepositoryMockRecorder) UpdateRequest(ctx, requestID, title, content, tags, targets, group interface{}) *gomock.Call { +func (mr *MockRequestRepositoryMockRecorder) UpdateRequest(ctx, requestID, title, content, tags, targets, group any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateRequest", reflect.TypeOf((*MockRequestRepository)(nil).UpdateRequest), ctx, requestID, title, content, tags, targets, group) } diff --git a/model/mock_model/mock_request_file.go b/model/mock_model/mock_request_file.go index 84c1ce95..2ea18670 100644 --- a/model/mock_model/mock_request_file.go +++ b/model/mock_model/mock_request_file.go @@ -1,11 +1,16 @@ // Code generated by MockGen. DO NOT EDIT. // Source: request_file.go +// +// Generated by this command: +// +// mockgen -source=request_file.go -destination=mock_model/mock_request_file.go -package=mock_model +// // Package mock_model is a generated GoMock package. package mock_model import ( - gomock "github.com/golang/mock/gomock" + gomock "go.uber.org/mock/gomock" ) // MockRequestFileRepository is a mock of RequestFileRepository interface. diff --git a/model/mock_model/mock_request_status.go b/model/mock_model/mock_request_status.go index 62bb0b95..d97399b3 100644 --- a/model/mock_model/mock_request_status.go +++ b/model/mock_model/mock_request_status.go @@ -1,5 +1,10 @@ // Code generated by MockGen. DO NOT EDIT. // Source: request_status.go +// +// Generated by this command: +// +// mockgen -source=request_status.go -destination=mock_model/mock_request_status.go -package=mock_model +// // Package mock_model is a generated GoMock package. package mock_model @@ -8,9 +13,9 @@ import ( context "context" reflect "reflect" - gomock "github.com/golang/mock/gomock" uuid "github.com/google/uuid" model "github.com/traPtitech/Jomon/model" + gomock "go.uber.org/mock/gomock" ) // MockRequestStatusRepository is a mock of RequestStatusRepository interface. @@ -46,7 +51,7 @@ func (m *MockRequestStatusRepository) CreateStatus(ctx context.Context, requestI } // CreateStatus indicates an expected call of CreateStatus. -func (mr *MockRequestStatusRepositoryMockRecorder) CreateStatus(ctx, requestID, userID, status interface{}) *gomock.Call { +func (mr *MockRequestStatusRepositoryMockRecorder) CreateStatus(ctx, requestID, userID, status any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateStatus", reflect.TypeOf((*MockRequestStatusRepository)(nil).CreateStatus), ctx, requestID, userID, status) } diff --git a/model/mock_model/mock_request_tag.go b/model/mock_model/mock_request_tag.go index c75b9ddc..8a00f744 100644 --- a/model/mock_model/mock_request_tag.go +++ b/model/mock_model/mock_request_tag.go @@ -1,11 +1,16 @@ // Code generated by MockGen. DO NOT EDIT. // Source: request_tag.go +// +// Generated by this command: +// +// mockgen -source=request_tag.go -destination=mock_model/mock_request_tag.go -package=mock_model +// // Package mock_model is a generated GoMock package. package mock_model import ( - gomock "github.com/golang/mock/gomock" + gomock "go.uber.org/mock/gomock" ) // MockRequestTagRepository is a mock of RequestTagRepository interface. diff --git a/model/mock_model/mock_request_target.go b/model/mock_model/mock_request_target.go index 86a045a0..efe9c1ec 100644 --- a/model/mock_model/mock_request_target.go +++ b/model/mock_model/mock_request_target.go @@ -1,5 +1,10 @@ // Code generated by MockGen. DO NOT EDIT. // Source: request_target.go +// +// Generated by this command: +// +// mockgen -source=request_target.go -destination=mock_model/mock_request_target.go -package=mock_model +// // Package mock_model is a generated GoMock package. package mock_model @@ -8,9 +13,9 @@ import ( context "context" reflect "reflect" - gomock "github.com/golang/mock/gomock" uuid "github.com/google/uuid" model "github.com/traPtitech/Jomon/model" + gomock "go.uber.org/mock/gomock" ) // MockRequestTargetRepository is a mock of RequestTargetRepository interface. @@ -46,7 +51,7 @@ func (m *MockRequestTargetRepository) GetRequestTargets(ctx context.Context, req } // GetRequestTargets indicates an expected call of GetRequestTargets. -func (mr *MockRequestTargetRepositoryMockRecorder) GetRequestTargets(ctx, requestID interface{}) *gomock.Call { +func (mr *MockRequestTargetRepositoryMockRecorder) GetRequestTargets(ctx, requestID any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetRequestTargets", reflect.TypeOf((*MockRequestTargetRepository)(nil).GetRequestTargets), ctx, requestID) } diff --git a/model/mock_model/mock_tag.go b/model/mock_model/mock_tag.go index e536a6bb..80a9b588 100644 --- a/model/mock_model/mock_tag.go +++ b/model/mock_model/mock_tag.go @@ -1,5 +1,10 @@ // Code generated by MockGen. DO NOT EDIT. // Source: tag.go +// +// Generated by this command: +// +// mockgen -source=tag.go -destination=mock_model/mock_tag.go -package=mock_model +// // Package mock_model is a generated GoMock package. package mock_model @@ -8,9 +13,9 @@ import ( context "context" reflect "reflect" - gomock "github.com/golang/mock/gomock" uuid "github.com/google/uuid" model "github.com/traPtitech/Jomon/model" + gomock "go.uber.org/mock/gomock" ) // MockTagRepository is a mock of TagRepository interface. @@ -46,7 +51,7 @@ func (m *MockTagRepository) CreateTag(ctx context.Context, name string) (*model. } // CreateTag indicates an expected call of CreateTag. -func (mr *MockTagRepositoryMockRecorder) CreateTag(ctx, name interface{}) *gomock.Call { +func (mr *MockTagRepositoryMockRecorder) CreateTag(ctx, name any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateTag", reflect.TypeOf((*MockTagRepository)(nil).CreateTag), ctx, name) } @@ -60,7 +65,7 @@ func (m *MockTagRepository) DeleteTag(ctx context.Context, tagID uuid.UUID) erro } // DeleteTag indicates an expected call of DeleteTag. -func (mr *MockTagRepositoryMockRecorder) DeleteTag(ctx, tagID interface{}) *gomock.Call { +func (mr *MockTagRepositoryMockRecorder) DeleteTag(ctx, tagID any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteTag", reflect.TypeOf((*MockTagRepository)(nil).DeleteTag), ctx, tagID) } @@ -75,7 +80,7 @@ func (m *MockTagRepository) GetTag(ctx context.Context, tagID uuid.UUID) (*model } // GetTag indicates an expected call of GetTag. -func (mr *MockTagRepositoryMockRecorder) GetTag(ctx, tagID interface{}) *gomock.Call { +func (mr *MockTagRepositoryMockRecorder) GetTag(ctx, tagID any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetTag", reflect.TypeOf((*MockTagRepository)(nil).GetTag), ctx, tagID) } @@ -90,7 +95,7 @@ func (m *MockTagRepository) GetTags(ctx context.Context) ([]*model.Tag, error) { } // GetTags indicates an expected call of GetTags. -func (mr *MockTagRepositoryMockRecorder) GetTags(ctx interface{}) *gomock.Call { +func (mr *MockTagRepositoryMockRecorder) GetTags(ctx any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetTags", reflect.TypeOf((*MockTagRepository)(nil).GetTags), ctx) } @@ -105,7 +110,7 @@ func (m *MockTagRepository) UpdateTag(ctx context.Context, tagID uuid.UUID, name } // UpdateTag indicates an expected call of UpdateTag. -func (mr *MockTagRepositoryMockRecorder) UpdateTag(ctx, tagID, name interface{}) *gomock.Call { +func (mr *MockTagRepositoryMockRecorder) UpdateTag(ctx, tagID, name any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateTag", reflect.TypeOf((*MockTagRepository)(nil).UpdateTag), ctx, tagID, name) } diff --git a/model/mock_model/mock_transaction.go b/model/mock_model/mock_transaction.go index 512bf70c..8ed24d71 100644 --- a/model/mock_model/mock_transaction.go +++ b/model/mock_model/mock_transaction.go @@ -1,5 +1,10 @@ // Code generated by MockGen. DO NOT EDIT. // Source: transaction.go +// +// Generated by this command: +// +// mockgen -source=transaction.go -destination=mock_model/mock_transaction.go -package=mock_model +// // Package mock_model is a generated GoMock package. package mock_model @@ -8,9 +13,9 @@ import ( context "context" reflect "reflect" - gomock "github.com/golang/mock/gomock" uuid "github.com/google/uuid" model "github.com/traPtitech/Jomon/model" + gomock "go.uber.org/mock/gomock" ) // MockTransactionRepository is a mock of TransactionRepository interface. @@ -46,7 +51,7 @@ func (m *MockTransactionRepository) CreateTransaction(ctx context.Context, Amoun } // CreateTransaction indicates an expected call of CreateTransaction. -func (mr *MockTransactionRepositoryMockRecorder) CreateTransaction(ctx, Amount, Target, tags, group, requestID interface{}) *gomock.Call { +func (mr *MockTransactionRepositoryMockRecorder) CreateTransaction(ctx, Amount, Target, tags, group, requestID any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateTransaction", reflect.TypeOf((*MockTransactionRepository)(nil).CreateTransaction), ctx, Amount, Target, tags, group, requestID) } @@ -61,7 +66,7 @@ func (m *MockTransactionRepository) GetTransaction(ctx context.Context, transact } // GetTransaction indicates an expected call of GetTransaction. -func (mr *MockTransactionRepositoryMockRecorder) GetTransaction(ctx, transactionID interface{}) *gomock.Call { +func (mr *MockTransactionRepositoryMockRecorder) GetTransaction(ctx, transactionID any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetTransaction", reflect.TypeOf((*MockTransactionRepository)(nil).GetTransaction), ctx, transactionID) } @@ -76,7 +81,7 @@ func (m *MockTransactionRepository) GetTransactions(ctx context.Context, query m } // GetTransactions indicates an expected call of GetTransactions. -func (mr *MockTransactionRepositoryMockRecorder) GetTransactions(ctx, query interface{}) *gomock.Call { +func (mr *MockTransactionRepositoryMockRecorder) GetTransactions(ctx, query any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetTransactions", reflect.TypeOf((*MockTransactionRepository)(nil).GetTransactions), ctx, query) } @@ -91,7 +96,7 @@ func (m *MockTransactionRepository) UpdateTransaction(ctx context.Context, trans } // UpdateTransaction indicates an expected call of UpdateTransaction. -func (mr *MockTransactionRepositoryMockRecorder) UpdateTransaction(ctx, transactionID, Amount, Target, tags, group, requestID interface{}) *gomock.Call { +func (mr *MockTransactionRepositoryMockRecorder) UpdateTransaction(ctx, transactionID, Amount, Target, tags, group, requestID any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateTransaction", reflect.TypeOf((*MockTransactionRepository)(nil).UpdateTransaction), ctx, transactionID, Amount, Target, tags, group, requestID) } diff --git a/model/mock_model/mock_transaction_detail.go b/model/mock_model/mock_transaction_detail.go index 2b70f294..6f79266b 100644 --- a/model/mock_model/mock_transaction_detail.go +++ b/model/mock_model/mock_transaction_detail.go @@ -1,11 +1,16 @@ // Code generated by MockGen. DO NOT EDIT. // Source: transaction_detail.go +// +// Generated by this command: +// +// mockgen -source=transaction_detail.go -destination=mock_model/mock_transaction_detail.go -package=mock_model +// // Package mock_model is a generated GoMock package. package mock_model import ( - gomock "github.com/golang/mock/gomock" + gomock "go.uber.org/mock/gomock" ) // MockTransactionDetailRepository is a mock of TransactionDetailRepository interface. diff --git a/model/mock_model/mock_transaction_tag.go b/model/mock_model/mock_transaction_tag.go index 51d53d34..2d6e2839 100644 --- a/model/mock_model/mock_transaction_tag.go +++ b/model/mock_model/mock_transaction_tag.go @@ -1,11 +1,16 @@ // Code generated by MockGen. DO NOT EDIT. // Source: transaction_tag.go +// +// Generated by this command: +// +// mockgen -source=transaction_tag.go -destination=mock_model/mock_transaction_tag.go -package=mock_model +// // Package mock_model is a generated GoMock package. package mock_model import ( - gomock "github.com/golang/mock/gomock" + gomock "go.uber.org/mock/gomock" ) // MockTransactionTagRepository is a mock of TransactionTagRepository interface. diff --git a/model/mock_model/mock_user.go b/model/mock_model/mock_user.go index f93dfa37..26063dce 100644 --- a/model/mock_model/mock_user.go +++ b/model/mock_model/mock_user.go @@ -1,5 +1,10 @@ // Code generated by MockGen. DO NOT EDIT. // Source: user.go +// +// Generated by this command: +// +// mockgen -source=user.go -destination=mock_model/mock_user.go -package=mock_model +// // Package mock_model is a generated GoMock package. package mock_model @@ -8,9 +13,9 @@ import ( context "context" reflect "reflect" - gomock "github.com/golang/mock/gomock" uuid "github.com/google/uuid" model "github.com/traPtitech/Jomon/model" + gomock "go.uber.org/mock/gomock" ) // MockUserRepository is a mock of UserRepository interface. @@ -46,7 +51,7 @@ func (m *MockUserRepository) CreateUser(ctx context.Context, name, dn string, ad } // CreateUser indicates an expected call of CreateUser. -func (mr *MockUserRepositoryMockRecorder) CreateUser(ctx, name, dn, admin interface{}) *gomock.Call { +func (mr *MockUserRepositoryMockRecorder) CreateUser(ctx, name, dn, admin any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateUser", reflect.TypeOf((*MockUserRepository)(nil).CreateUser), ctx, name, dn, admin) } @@ -61,7 +66,7 @@ func (m *MockUserRepository) GetUserByID(ctx context.Context, userID uuid.UUID) } // GetUserByID indicates an expected call of GetUserByID. -func (mr *MockUserRepositoryMockRecorder) GetUserByID(ctx, userID interface{}) *gomock.Call { +func (mr *MockUserRepositoryMockRecorder) GetUserByID(ctx, userID any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetUserByID", reflect.TypeOf((*MockUserRepository)(nil).GetUserByID), ctx, userID) } @@ -76,7 +81,7 @@ func (m *MockUserRepository) GetUserByName(ctx context.Context, name string) (*m } // GetUserByName indicates an expected call of GetUserByName. -func (mr *MockUserRepositoryMockRecorder) GetUserByName(ctx, name interface{}) *gomock.Call { +func (mr *MockUserRepositoryMockRecorder) GetUserByName(ctx, name any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetUserByName", reflect.TypeOf((*MockUserRepository)(nil).GetUserByName), ctx, name) } @@ -91,7 +96,7 @@ func (m *MockUserRepository) GetUsers(ctx context.Context) ([]*model.User, error } // GetUsers indicates an expected call of GetUsers. -func (mr *MockUserRepositoryMockRecorder) GetUsers(ctx interface{}) *gomock.Call { +func (mr *MockUserRepositoryMockRecorder) GetUsers(ctx any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetUsers", reflect.TypeOf((*MockUserRepository)(nil).GetUsers), ctx) } @@ -106,7 +111,7 @@ func (m *MockUserRepository) UpdateUser(ctx context.Context, userID uuid.UUID, n } // UpdateUser indicates an expected call of UpdateUser. -func (mr *MockUserRepositoryMockRecorder) UpdateUser(ctx, userID, name, dn, admin interface{}) *gomock.Call { +func (mr *MockUserRepositoryMockRecorder) UpdateUser(ctx, userID, name, dn, admin any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateUser", reflect.TypeOf((*MockUserRepository)(nil).UpdateUser), ctx, userID, name, dn, admin) } diff --git a/router/admin_test.go b/router/admin_test.go index cca30cc1..d35df005 100644 --- a/router/admin_test.go +++ b/router/admin_test.go @@ -8,13 +8,13 @@ import ( "strings" "testing" - "github.com/golang/mock/gomock" "github.com/google/uuid" "github.com/labstack/echo/v4" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "github.com/traPtitech/Jomon/ent" "github.com/traPtitech/Jomon/model" + "go.uber.org/mock/gomock" ) func TestHandler_GetAdmins(t *testing.T) { diff --git a/router/file_test.go b/router/file_test.go index f03904a2..a41c8810 100644 --- a/router/file_test.go +++ b/router/file_test.go @@ -13,7 +13,6 @@ import ( "testing" "time" - "github.com/golang/mock/gomock" "github.com/google/uuid" "github.com/gorilla/sessions" "github.com/labstack/echo-contrib/session" @@ -22,6 +21,7 @@ import ( "github.com/stretchr/testify/require" "github.com/traPtitech/Jomon/model" "github.com/traPtitech/Jomon/testutil/random" + "go.uber.org/mock/gomock" ) // nolint:lll diff --git a/router/group_test.go b/router/group_test.go index 6381354d..572ea26a 100644 --- a/router/group_test.go +++ b/router/group_test.go @@ -11,7 +11,6 @@ import ( "testing" "time" - "github.com/golang/mock/gomock" "github.com/google/uuid" "github.com/labstack/echo/v4" "github.com/stretchr/testify/assert" @@ -19,6 +18,7 @@ import ( "github.com/traPtitech/Jomon/ent" "github.com/traPtitech/Jomon/model" "github.com/traPtitech/Jomon/testutil/random" + "go.uber.org/mock/gomock" ) func TestHandlers_GetGroups(t *testing.T) { diff --git a/router/request_test.go b/router/request_test.go index b0f2a797..7bdac653 100644 --- a/router/request_test.go +++ b/router/request_test.go @@ -13,7 +13,6 @@ import ( "github.com/gorilla/sessions" - "github.com/golang/mock/gomock" "github.com/google/uuid" "github.com/labstack/echo-contrib/session" "github.com/labstack/echo/v4" @@ -23,6 +22,7 @@ import ( "github.com/traPtitech/Jomon/model" "github.com/traPtitech/Jomon/service" "github.com/traPtitech/Jomon/testutil/random" + "go.uber.org/mock/gomock" ) // To do diff --git a/router/router_test.go b/router/router_test.go index 6ab30dfe..10373336 100644 --- a/router/router_test.go +++ b/router/router_test.go @@ -7,11 +7,11 @@ import ( "github.com/traPtitech/Jomon/storage/mock_storage" - "github.com/golang/mock/gomock" "github.com/google/uuid" "github.com/traPtitech/Jomon/model" "github.com/traPtitech/Jomon/model/mock_model" "github.com/traPtitech/Jomon/testutil/random" + "go.uber.org/mock/gomock" "go.uber.org/zap" ) diff --git a/router/tag_test.go b/router/tag_test.go index c08096a5..9381f645 100644 --- a/router/tag_test.go +++ b/router/tag_test.go @@ -11,13 +11,13 @@ import ( "testing" "time" - "github.com/golang/mock/gomock" "github.com/google/uuid" "github.com/labstack/echo/v4" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "github.com/traPtitech/Jomon/model" "github.com/traPtitech/Jomon/testutil/random" + "go.uber.org/mock/gomock" ) func TestHandlers_GetTags(t *testing.T) { diff --git a/router/transaction_test.go b/router/transaction_test.go index 7cc038c2..2cfe0b88 100644 --- a/router/transaction_test.go +++ b/router/transaction_test.go @@ -9,7 +9,6 @@ import ( "testing" "time" - "github.com/golang/mock/gomock" "github.com/google/uuid" "github.com/labstack/echo/v4" "github.com/stretchr/testify/assert" @@ -17,6 +16,7 @@ import ( "github.com/traPtitech/Jomon/model" "github.com/traPtitech/Jomon/service" "github.com/traPtitech/Jomon/testutil/random" + "go.uber.org/mock/gomock" ) func TestHandlers_GetTransactions(t *testing.T) { diff --git a/router/user_test.go b/router/user_test.go index 685298e5..b5f28adb 100644 --- a/router/user_test.go +++ b/router/user_test.go @@ -12,11 +12,11 @@ import ( "github.com/gorilla/sessions" - "github.com/golang/mock/gomock" "github.com/labstack/echo-contrib/session" "github.com/labstack/echo/v4" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "go.uber.org/mock/gomock" "github.com/traPtitech/Jomon/model" "github.com/traPtitech/Jomon/testutil/random" diff --git a/storage/mock_storage/mock_storage.go b/storage/mock_storage/mock_storage.go index c4ef5a21..f5e1c2d8 100644 --- a/storage/mock_storage/mock_storage.go +++ b/storage/mock_storage/mock_storage.go @@ -1,5 +1,10 @@ // Code generated by MockGen. DO NOT EDIT. // Source: storage.go +// +// Generated by this command: +// +// mockgen -source=storage.go -destination=mock_storage/mock_storage.go -package=mock_storage +// // Package mock_storage is a generated GoMock package. package mock_storage @@ -8,7 +13,7 @@ import ( io "io" reflect "reflect" - gomock "github.com/golang/mock/gomock" + gomock "go.uber.org/mock/gomock" ) // MockStorage is a mock of Storage interface. @@ -43,7 +48,7 @@ func (m *MockStorage) Delete(filename string) error { } // Delete indicates an expected call of Delete. -func (mr *MockStorageMockRecorder) Delete(filename interface{}) *gomock.Call { +func (mr *MockStorageMockRecorder) Delete(filename any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockStorage)(nil).Delete), filename) } @@ -58,7 +63,7 @@ func (m *MockStorage) Open(filename string) (io.ReadCloser, error) { } // Open indicates an expected call of Open. -func (mr *MockStorageMockRecorder) Open(filename interface{}) *gomock.Call { +func (mr *MockStorageMockRecorder) Open(filename any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Open", reflect.TypeOf((*MockStorage)(nil).Open), filename) } @@ -72,7 +77,7 @@ func (m *MockStorage) Save(filename string, src io.Reader) error { } // Save indicates an expected call of Save. -func (mr *MockStorageMockRecorder) Save(filename, src interface{}) *gomock.Call { +func (mr *MockStorageMockRecorder) Save(filename, src any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Save", reflect.TypeOf((*MockStorage)(nil).Save), filename, src) }