mirror of
https://github.com/mattermost/mattermost.git
synced 2026-02-03 20:40:00 -05:00
* Upgrade Go to 1.24.3 Updates the following files: - server/.go-version: 1.23.9 → 1.24.3 - server/build/Dockerfile.buildenv: golang:1.23.9-bullseye → golang:1.24.3-bullseye - server/go.mod: go 1.23.0 → go 1.24.3, toolchain go1.23.9 → go1.24.3 - server/public/go.mod: go 1.23.0 → go 1.24.3, toolchain go1.23.9 → go1.24.3 Also fixes non-constant format string errors introduced by Go 1.24.3's stricter format string checking: - Added response() helper function in slashcommands/util.go for simple string responses - Removed unused responsef() function from slashcommands/util.go - Replaced responsef() with response() for translated strings that don't need formatting - Fixed fmt.Errorf and fmt.Fprintf calls to use proper format verbs instead of string concatenation - Updated marketplace buildURL to handle format strings conditionally 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> * Update generated mocks for Go 1.24.3 Regenerated mocks using mockery v2.53.4 to ensure compatibility with Go 1.24.3. This addresses mock generation failures that occurred with the Go upgrade. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> * Update to bookworm and fix non-existent sha Signed-off-by: Stavros Foteinopoulos <stafot@gmail.com> * fix non-constant format string --------- Signed-off-by: Stavros Foteinopoulos <stafot@gmail.com> Co-authored-by: Claude <noreply@anthropic.com> Co-authored-by: Stavros Foteinopoulos <stafot@gmail.com>
213 lines
4.3 KiB
Go
213 lines
4.3 KiB
Go
// Code generated by mockery v2.53.4. DO NOT EDIT.
|
|
|
|
// Regenerate this file using `make cache-mocks`.
|
|
|
|
package mocks
|
|
|
|
import (
|
|
time "time"
|
|
|
|
model "github.com/mattermost/mattermost/server/public/model"
|
|
mock "github.com/stretchr/testify/mock"
|
|
)
|
|
|
|
// Cache is an autogenerated mock type for the Cache type
|
|
type Cache struct {
|
|
mock.Mock
|
|
}
|
|
|
|
// Get provides a mock function with given fields: key, value
|
|
func (_m *Cache) Get(key string, value interface{}) error {
|
|
ret := _m.Called(key, value)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for Get")
|
|
}
|
|
|
|
var r0 error
|
|
if rf, ok := ret.Get(0).(func(string, interface{}) error); ok {
|
|
r0 = rf(key, value)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// GetInvalidateClusterEvent provides a mock function with no fields
|
|
func (_m *Cache) GetInvalidateClusterEvent() model.ClusterEvent {
|
|
ret := _m.Called()
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for GetInvalidateClusterEvent")
|
|
}
|
|
|
|
var r0 model.ClusterEvent
|
|
if rf, ok := ret.Get(0).(func() model.ClusterEvent); ok {
|
|
r0 = rf()
|
|
} else {
|
|
r0 = ret.Get(0).(model.ClusterEvent)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// GetMulti provides a mock function with given fields: keys, values
|
|
func (_m *Cache) GetMulti(keys []string, values []interface{}) []error {
|
|
ret := _m.Called(keys, values)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for GetMulti")
|
|
}
|
|
|
|
var r0 []error
|
|
if rf, ok := ret.Get(0).(func([]string, []interface{}) []error); ok {
|
|
r0 = rf(keys, values)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).([]error)
|
|
}
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// Name provides a mock function with no fields
|
|
func (_m *Cache) Name() string {
|
|
ret := _m.Called()
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for Name")
|
|
}
|
|
|
|
var r0 string
|
|
if rf, ok := ret.Get(0).(func() string); ok {
|
|
r0 = rf()
|
|
} else {
|
|
r0 = ret.Get(0).(string)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// Purge provides a mock function with no fields
|
|
func (_m *Cache) Purge() error {
|
|
ret := _m.Called()
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for Purge")
|
|
}
|
|
|
|
var r0 error
|
|
if rf, ok := ret.Get(0).(func() error); ok {
|
|
r0 = rf()
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// Remove provides a mock function with given fields: key
|
|
func (_m *Cache) Remove(key string) error {
|
|
ret := _m.Called(key)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for Remove")
|
|
}
|
|
|
|
var r0 error
|
|
if rf, ok := ret.Get(0).(func(string) error); ok {
|
|
r0 = rf(key)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// RemoveMulti provides a mock function with given fields: keys
|
|
func (_m *Cache) RemoveMulti(keys []string) error {
|
|
ret := _m.Called(keys)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for RemoveMulti")
|
|
}
|
|
|
|
var r0 error
|
|
if rf, ok := ret.Get(0).(func([]string) error); ok {
|
|
r0 = rf(keys)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// Scan provides a mock function with given fields: f
|
|
func (_m *Cache) Scan(f func([]string) error) error {
|
|
ret := _m.Called(f)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for Scan")
|
|
}
|
|
|
|
var r0 error
|
|
if rf, ok := ret.Get(0).(func(func([]string) error) error); ok {
|
|
r0 = rf(f)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// SetWithDefaultExpiry provides a mock function with given fields: key, value
|
|
func (_m *Cache) SetWithDefaultExpiry(key string, value interface{}) error {
|
|
ret := _m.Called(key, value)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for SetWithDefaultExpiry")
|
|
}
|
|
|
|
var r0 error
|
|
if rf, ok := ret.Get(0).(func(string, interface{}) error); ok {
|
|
r0 = rf(key, value)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// SetWithExpiry provides a mock function with given fields: key, value, ttl
|
|
func (_m *Cache) SetWithExpiry(key string, value interface{}, ttl time.Duration) error {
|
|
ret := _m.Called(key, value, ttl)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for SetWithExpiry")
|
|
}
|
|
|
|
var r0 error
|
|
if rf, ok := ret.Get(0).(func(string, interface{}, time.Duration) error); ok {
|
|
r0 = rf(key, value, ttl)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// NewCache creates a new instance of Cache. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
|
|
// The first argument is typically a *testing.T value.
|
|
func NewCache(t interface {
|
|
mock.TestingT
|
|
Cleanup(func())
|
|
}) *Cache {
|
|
mock := &Cache{}
|
|
mock.Mock.Test(t)
|
|
|
|
t.Cleanup(func() { mock.AssertExpectations(t) })
|
|
|
|
return mock
|
|
}
|