()
| 273 | return s.mux |
| 274 | } |
| 275 | func 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 | } |
| 285 | func New() (*Serve, error) { |
| 286 | for _, sfn := range serverStartupTasks { |
| 287 | sfn() |
no test coverage detected