feat: 修复golint相关警告信息

This commit is contained in:
2025-12-26 12:01:52 +08:00
parent c23d938092
commit 1636a2652f
9 changed files with 21 additions and 25 deletions

View File

@@ -81,8 +81,6 @@ func (c controller) methodConfig(reflectMethod reflect.Method) (cfg UriConfig, n
return
}
cfg.ResultDataType = methodType.Out(0)
if cfg.ResultDataType == nil {
}
if methodType.Out(1).Kind().String() != ErrorType {
// 判断是否是实现 error接口的方法
outputErrParse := false
@@ -106,7 +104,6 @@ func (c controller) methodConfig(reflectMethod reflect.Method) (cfg UriConfig, n
// 开启输出严格模式校验
if methodType.Out(0).Kind() != reflect.Struct && methodType.Out(0).Kind() != reflect.Map {
panic(cfg.Path + " : 接口配置输出严格校验, 输出数据类型必须为 struct 或 *struct 或 map, 实际返回数据类型 : " + methodType.Out(0).Kind().String())
return
}
}