MM-15290: Migrate commandStore.GetByTrigger to sync by default (#10741)
* MM-15290: migrate command.GetByTrigger to sync by default * Fix build * MM-15290: fix go vet issue
Этот коммит содержится в:
коммит произвёл
Jesús Espino
родитель
9ab3cc9051
Коммит
6ce3cc6921
@@ -6,7 +6,6 @@ package mocks
|
||||
|
||||
import mock "github.com/stretchr/testify/mock"
|
||||
import model "github.com/mattermost/mattermost-server/model"
|
||||
import store "github.com/mattermost/mattermost-server/store"
|
||||
|
||||
// CommandStore is an autogenerated mock type for the CommandStore type
|
||||
type CommandStore struct {
|
||||
@@ -103,19 +102,28 @@ func (_m *CommandStore) GetByTeam(teamId string) ([]*model.Command, *model.AppEr
|
||||
}
|
||||
|
||||
// GetByTrigger provides a mock function with given fields: teamId, trigger
|
||||
func (_m *CommandStore) GetByTrigger(teamId string, trigger string) store.StoreChannel {
|
||||
func (_m *CommandStore) GetByTrigger(teamId string, trigger string) (*model.Command, *model.AppError) {
|
||||
ret := _m.Called(teamId, trigger)
|
||||
|
||||
var r0 store.StoreChannel
|
||||
if rf, ok := ret.Get(0).(func(string, string) store.StoreChannel); ok {
|
||||
var r0 *model.Command
|
||||
if rf, ok := ret.Get(0).(func(string, string) *model.Command); ok {
|
||||
r0 = rf(teamId, trigger)
|
||||
} else {
|
||||
if ret.Get(0) != nil {
|
||||
r0 = ret.Get(0).(store.StoreChannel)
|
||||
r0 = ret.Get(0).(*model.Command)
|
||||
}
|
||||
}
|
||||
|
||||
return r0
|
||||
var r1 *model.AppError
|
||||
if rf, ok := ret.Get(1).(func(string, string) *model.AppError); ok {
|
||||
r1 = rf(teamId, trigger)
|
||||
} else {
|
||||
if ret.Get(1) != nil {
|
||||
r1 = ret.Get(1).(*model.AppError)
|
||||
}
|
||||
}
|
||||
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
// PermanentDeleteByTeam provides a mock function with given fields: teamId
|
||||
|
||||
Ссылка в новой задаче
Block a user