- 新增 backend/.golangci.yml 配置 12 个 linter(forbidigo、errorlint、errcheck、staticcheck、revive、gocritic、gosec、bodyclose、noctx、nilerr、goimports、gocyclo) - 新增 lefthook.yml 配置 pre-commit hook 自动运行 lint - 修复存量代码违规:errors.Is/As 替换、zap.Error 替换、import 排序、errcheck 修复 - 更新 README 补充编码规范说明 - 归档 backend-code-lint 变更
58 lines
1.8 KiB
Go
58 lines
1.8 KiB
Go
// Code generated by MockGen. DO NOT EDIT.
|
|
// Source: routing_service.go
|
|
//
|
|
// Generated by this command:
|
|
//
|
|
// mockgen -source=routing_service.go -destination=../../tests/mocks/mock_routing_service.go -package=mocks
|
|
//
|
|
|
|
// Package mocks is a generated GoMock package.
|
|
package mocks
|
|
|
|
import (
|
|
reflect "reflect"
|
|
|
|
domain "nex/backend/internal/domain"
|
|
|
|
gomock "go.uber.org/mock/gomock"
|
|
)
|
|
|
|
// MockRoutingService is a mock of RoutingService interface.
|
|
type MockRoutingService struct {
|
|
ctrl *gomock.Controller
|
|
recorder *MockRoutingServiceMockRecorder
|
|
isgomock struct{}
|
|
}
|
|
|
|
// MockRoutingServiceMockRecorder is the mock recorder for MockRoutingService.
|
|
type MockRoutingServiceMockRecorder struct {
|
|
mock *MockRoutingService
|
|
}
|
|
|
|
// NewMockRoutingService creates a new mock instance.
|
|
func NewMockRoutingService(ctrl *gomock.Controller) *MockRoutingService {
|
|
mock := &MockRoutingService{ctrl: ctrl}
|
|
mock.recorder = &MockRoutingServiceMockRecorder{mock}
|
|
return mock
|
|
}
|
|
|
|
// EXPECT returns an object that allows the caller to indicate expected use.
|
|
func (m *MockRoutingService) EXPECT() *MockRoutingServiceMockRecorder {
|
|
return m.recorder
|
|
}
|
|
|
|
// RouteByModelName mocks base method.
|
|
func (m *MockRoutingService) RouteByModelName(providerID, modelName string) (*domain.RouteResult, error) {
|
|
m.ctrl.T.Helper()
|
|
ret := m.ctrl.Call(m, "RouteByModelName", providerID, modelName)
|
|
ret0, _ := ret[0].(*domain.RouteResult)
|
|
ret1, _ := ret[1].(error)
|
|
return ret0, ret1
|
|
}
|
|
|
|
// RouteByModelName indicates an expected call of RouteByModelName.
|
|
func (mr *MockRoutingServiceMockRecorder) RouteByModelName(providerID, modelName any) *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RouteByModelName", reflect.TypeOf((*MockRoutingService)(nil).RouteByModelName), providerID, modelName)
|
|
}
|