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

Function ServerGoMain

codegen/server.go:9–19  ·  view source on GitHub ↗

ServerGoMain returns the main.go for the server

(appPath string)

Source from the content-addressed store, hash-verified

7
8// ServerGoMain returns the main.go for the server
9func ServerGoMain(appPath string) (string, error) {
10 b := new(bytes.Buffer)
11 data := map[string]string{
12 "AppPath": appPath,
13 }
14 if err := serverGoTemplate.Execute(b, data); err != nil {
15 return "", err
16 }
17 return string(b.Bytes()), nil
18
19}
20
21var serverGoTemplate = template.Must(template.New("servergo").Parse(serverGoTemplateStr))
22

Callers 1

populateAppFunction · 0.92

Calls

no outgoing calls

Tested by

no test coverage detected