refactor: run Go modernize (#5002)
This commit is contained in:
@@ -218,7 +218,7 @@ func (m *MockMediaFileRepo) Count(...rest.QueryOptions) (int64, error) {
|
||||
return m.CountAll()
|
||||
}
|
||||
|
||||
func (m *MockMediaFileRepo) Read(id string) (interface{}, error) {
|
||||
func (m *MockMediaFileRepo) Read(id string) (any, error) {
|
||||
mf, err := m.Get(id)
|
||||
if errors.Is(err, model.ErrNotFound) {
|
||||
return nil, rest.ErrNotFound
|
||||
@@ -226,7 +226,7 @@ func (m *MockMediaFileRepo) Read(id string) (interface{}, error) {
|
||||
return mf, err
|
||||
}
|
||||
|
||||
func (m *MockMediaFileRepo) ReadAll(...rest.QueryOptions) (interface{}, error) {
|
||||
func (m *MockMediaFileRepo) ReadAll(...rest.QueryOptions) (any, error) {
|
||||
return m.GetAll()
|
||||
}
|
||||
|
||||
@@ -234,7 +234,7 @@ func (m *MockMediaFileRepo) EntityName() string {
|
||||
return "mediafile"
|
||||
}
|
||||
|
||||
func (m *MockMediaFileRepo) NewInstance() interface{} {
|
||||
func (m *MockMediaFileRepo) NewInstance() any {
|
||||
return &model.MediaFile{}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user