MCPcopy Create free account
hub / github.com/nsf/gocode / wrap_function

Function wrap_function

_goremote/goremote.go:210–218  ·  view source on GitHub ↗
(out io.Writer, fun *ast.FuncDecl)

Source from the content-addressed store, hash-verified

208}
209
210func wrap_function(out io.Writer, fun *ast.FuncDecl) {
211 name := fun.Name.Name[len(prefix):]
212 fmt.Fprintf(out, "// wrapper for: %s\n\n", fun.Name.Name)
213 argcnt := generate_struct_wrapper(out, fun.Type.Params, "Args", name)
214 replycnt := generate_struct_wrapper(out, fun.Type.Results, "Reply", name)
215 generate_server_rpc_wrapper(out, fun, name, argcnt, replycnt)
216 generate_client_rpc_wrapper(out, fun, name, argcnt, replycnt)
217 fmt.Fprintf(out, "\n")
218}
219
220func process_file(out io.Writer, filename string) {
221 fset := token.NewFileSet()

Callers 1

process_fileFunction · 0.85

Calls 3

generate_struct_wrapperFunction · 0.85

Tested by

no test coverage detected