@@ -38,5 +38,5 @@ func Cache() ICache {
} else {
ch.GfCache = cache.New(prefix)
}
- return ICache(&ch)
+ return &ch
@@ -32,7 +32,7 @@ var (
)
func Captcha() ICaptcha {
- return ICaptcha(&captcha)
+ return &captcha
// GetVerifyImgString 获取字母数字混合验证码
@@ -18,7 +18,7 @@ type middlewareImpl struct{}
var middleService = middlewareImpl{}
func Middleware() IMiddleware {
- return IMiddleware(&middleService)
+ return &middleService
func (s *middlewareImpl) MiddlewareCORS(r *ghttp.Request) {
@@ -35,7 +35,7 @@ type configTmpl struct {
var configService = configTmpl{}
func Config() IConfig {
- return IConfig(&configService)
+ return &configService
// List 系统参数列表
@@ -36,7 +36,7 @@ type dictDataImpl struct {
var dictData = dictDataImpl{}
func DictData() IDictData {
- return IDictData(&dictData)
+ return &dictData
// GetDictWithDataByType 通过字典键类型获取选项
@@ -38,7 +38,7 @@ type dictTypeImpl struct {
var dictTypeService = dictTypeImpl{}
func DictType() IDictType {
- return IDictType(&dictTypeService)
+ return &dictTypeService
// List 字典类型列表
@@ -45,5 +45,5 @@ func GfToken(options *model.TokenOptions) IGfToken {
gftoken.WithExcludePaths(options.ExcludePaths),
fun,
- return IGfToken(&gT)
+ return &gT
@@ -28,7 +28,7 @@ var contextService = contextServiceImpl{}
type contextServiceImpl struct{}
func Context() IContext {
- return IContext(&contextService)
+ return &contextService
// Init 初始化上下文对象指针到上下文对象中,以便后续的请求流程中可以修改。
@@ -28,7 +28,7 @@ type middlewareImpl struct{}
// Ctx 自定义上下文对象
@@ -43,7 +43,7 @@ type ruleImpl struct {
var ruleService = ruleImpl{}
func Rule() IRule {
- return IRule(&ruleService)
+ return &ruleService
func (s *ruleImpl) GetMenuListSearch(ctx context.Context, req *system.RuleSearchReq) (res []*model.SysAuthRuleInfoRes, err error) {
@@ -35,7 +35,7 @@ type IDept interface {
var deptService = deptImpl{}
func Dept() IDept {
- return IDept(&deptService)
+ return &deptService
type deptImpl struct {
@@ -37,7 +37,7 @@ var (
func SysLoginLog() ISysLoginLog {
- return ISysLoginLog(&sysLoginLogService)
+ return &sysLoginLogService
func (s *sysLoginLogImpl) Invoke(ctx context.Context, data *model.LoginLogParams) {
@@ -33,7 +33,7 @@ type postImpl struct {
var postService = postImpl{}
func Post() IPost {
- return IPost(&postService)
+ return &postService
// List 岗位列表
@@ -37,7 +37,7 @@ type roleImpl struct {
var roleService = roleImpl{}
func Role() IRole {
- return IRole(&roleService)
+ return &roleService
func (s *roleImpl) GetRoleListSearch(ctx context.Context, req *system.RoleListReq) (res *system.RoleListRes, err error) {
@@ -58,7 +58,7 @@ var (
func User() IUser {
- return IUser(&userService)
+ return &userService
func (s *userImpl) NotCheckAuthAdminIds(ctx context.Context) *gset.Set {