Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 45079048af |
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" {
|
if strings.ToLower(method.Output.GoIdent.GoName) == "statusreply" {
|
||||||
imports = append(imports, "\"time\"")
|
imports = append(imports, "\"time\"")
|
||||||
|
imports = append(imports, "\"git.apinb.com/bsm-sdk/core/vars\"")
|
||||||
code = strings.ReplaceAll(code, "{return}", tpl.StatusReplyCode)
|
code = strings.ReplaceAll(code, "{return}", tpl.StatusReplyCode)
|
||||||
} else {
|
} else {
|
||||||
code = strings.ReplaceAll(code, "{return}", "return ")
|
code = strings.ReplaceAll(code, "{return}", "return ")
|
||||||
|
|||||||
@@ -4,9 +4,9 @@ var LogicFile = `package {methodName}
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
|
|
||||||
{import}
|
{import}
|
||||||
"git.apinb.com/bsm-sdk/core/service"
|
"git.apinb.com/bsm-sdk/core/service"
|
||||||
"git.apinb.com/bsm-sdk/core/vars"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
{comment}
|
{comment}
|
||||||
|
|||||||
Reference in New Issue
Block a user