Open is part of the http.FileSystem interface.
(name string)
| 476 | |
| 477 | // Open is part of the http.FileSystem interface. |
| 478 | func (httpFS uiHTTPDir) Open(name string) (http.File, error) { |
| 479 | fsFile, err := httpFS.FileSystem.Open(name) |
| 480 | if err != nil && errors.Is(err, fs.ErrNotExist) { |
| 481 | return httpFS.FileSystem.Open("index.html") |
| 482 | } |
| 483 | |
| 484 | return fsFile, err |
| 485 | } |
| 486 | |
| 487 | type documentationHTTPDir struct { |
| 488 | http.FileSystem |
no outgoing calls