```
feat(core): 添加 vars 包导入以支持状态回复功能 在生成逻辑文件时,为处理 StatusReply 类型的输出, 添加了对 "git.apinb.com/bsm-sdk/core/vars" 包的导入。 同时调整了模板中导入语句的顺序和格式。 ```
This commit is contained in:
1
main.go
1
main.go
@@ -181,6 +181,7 @@ func generateLogicFile(gen *protogen.Plugin, file *protogen.File, service *proto
|
||||
|
||||
if strings.ToLower(method.Output.GoIdent.GoName) == "statusreply" {
|
||||
imports = append(imports, "\"time\"")
|
||||
imports = append(imports, "\"git.apinb.com/bsm-sdk/core/vars\"")
|
||||
code = strings.ReplaceAll(code, "{return}", tpl.StatusReplyCode)
|
||||
} else {
|
||||
code = strings.ReplaceAll(code, "{return}", "return ")
|
||||
|
||||
Reference in New Issue
Block a user