MCPcopy Create free account
hub / github.com/GuyARoss/orbit / setupDoc

Function setupDoc

examples/basic-react/orbitgen/orb_http.go:275–284  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

273 return s.mux
274}
275func setupDoc() *htmlDoc {
276 html := ""
277 _, err := os.Stat(publicDir)
278 if !os.IsNotExist(err) {
279 // invalid files should already be skipped, besides that, an empty []byte should suffice.
280 data, _ := ioutil.ReadFile(publicDir)
281 html = string(data)
282 }
283 return defaultHTMLDoc(html)
284}
285func New() (*Serve, error) {
286 for _, sfn := range serverStartupTasks {
287 sfn()

Callers 1

NewFunction · 0.70

Calls 2

ReadFileMethod · 0.80
defaultHTMLDocFunction · 0.70

Tested by

no test coverage detected