feat: 升级hook处理逻辑
This commit is contained in:
@@ -109,6 +109,8 @@ func (c controller) methodConfig(reflectMethod reflect.Method) (cfg UriConfig, n
|
||||
cfg.TagList = strings.Split(metaField.Tag.Get(TagNameUriTag), ",")
|
||||
// 解析第一个返回值, 要求必须是结构体或者是map
|
||||
outputStrictModel := metaField.Tag.Get(TagNameOutputStrict)
|
||||
hookSync := strings.ToLower(metaField.Tag.Get(TagNameHookSync))
|
||||
cfg.HookSync = hookSync == "1" || hookSync == "true" // 同步执行判断
|
||||
cfg.OutputStrict = outputStrictModel == "1" || outputStrictModel == "true"
|
||||
if cfg.OutputStrict {
|
||||
// 开启输出严格模式校验
|
||||
|
||||
Reference in New Issue
Block a user