mirror of
https://github.com/foomo/gotsrpc.git
synced 2025-10-16 12:35:35 +00:00
feat: load arguments only if arguments are present
This commit is contained in:
parent
1cc04aea5e
commit
2f24c705fb
3
go.go
3
go.go
@ -290,6 +290,7 @@ func renderTSRPCServiceProxies(services ServiceList, fullPackageName string, pac
|
||||
callArgs = append(callArgs, argName)
|
||||
skipArgI++
|
||||
}
|
||||
if len(args) > 0 {
|
||||
g.l("var (")
|
||||
for _, argDecl := range argsDecls {
|
||||
g.l(argDecl)
|
||||
@ -303,7 +304,7 @@ func renderTSRPCServiceProxies(services ServiceList, fullPackageName string, pac
|
||||
g.l("return")
|
||||
g.ind(-1)
|
||||
g.l("}")
|
||||
|
||||
}
|
||||
}
|
||||
returnValueNames := []string{}
|
||||
for retI, retField := range method.Return {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user