summaryrefslogtreecommitdiffstats
path: root/plugin/interface_generator/main.go
diff options
context:
space:
mode:
Diffstat (limited to 'plugin/interface_generator/main.go')
-rw-r--r--plugin/interface_generator/main.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/plugin/interface_generator/main.go b/plugin/interface_generator/main.go
index b321c344a..6aa8bdfb1 100644
--- a/plugin/interface_generator/main.go
+++ b/plugin/interface_generator/main.go
@@ -229,7 +229,7 @@ func (g *hooksRPCClient) {{.Name}}{{funcStyle .Params}} {{funcStyle .Return}} {
g.log.Error("RPC call {{.Name}} to plugin failed.", mlog.Err(err))
}
}
- return {{destruct "_returns." .Return}}
+ {{ if .Return }} return {{destruct "_returns." .Return}} {{ end }}
}
func (s *hooksRPCServer) {{.Name}}(args *{{.Name | obscure}}Args, returns *{{.Name | obscure}}Returns) error {
@@ -260,7 +260,7 @@ func (g *apiRPCClient) {{.Name}}{{funcStyle .Params}} {{funcStyle .Return}} {
if err := g.client.Call("Plugin.{{.Name}}", _args, _returns); err != nil {
log.Printf("RPC call to {{.Name}} API failed: %s", err.Error())
}
- return {{destruct "_returns." .Return}}
+ {{ if .Return }} return {{destruct "_returns." .Return}} {{ end }}
}
func (s *apiRPCServer) {{.Name}}(args *{{.Name | obscure}}Args, returns *{{.Name | obscure}}Returns) error {