MCPcopy Create free account
hub / github.com/factorapp/factor / ClientGoMain

Function ClientGoMain

codegen/clientmain.go:9–16  ·  view source on GitHub ↗

ClientGoMain returns the Go code for the main function for the wasm app

(appPath string)

Source from the content-addressed store, hash-verified

7
8// ClientGoMain returns the Go code for the main function for the wasm app
9func ClientGoMain(appPath string) (string, error) {
10 b := new(bytes.Buffer)
11 data := map[string]string{"AppPath": appPath}
12 if err := clMainTemplate.Execute(b, data); err != nil {
13 return "", err
14 }
15 return string(b.Bytes()), nil
16}
17
18var clMainTemplate = template.Must(template.New("cl").Parse(clMainTemplateStr))
19

Callers 1

populateAppFunction · 0.92

Calls

no outgoing calls

Tested by

no test coverage detected