StaticFile registers a single route in order to serve a single file of the local filesystem. router.StaticFile("favicon.ico", "./resources/favicon.ico")
(relativePath, filepath string)
| 164 | // StaticFile registers a single route in order to serve a single file of the local filesystem. |
| 165 | // router.StaticFile("favicon.ico", "./resources/favicon.ico") |
| 166 | func (group *RouterGroup) StaticFile(relativePath, filepath string) IRoutes { |
| 167 | return group.staticFileHandler(relativePath, func(c *Context) { |
| 168 | c.File(filepath) |
| 169 | }) |
| 170 | } |
| 171 | |
| 172 | // StaticFileFS works just like `StaticFile` but a custom `http.FileSystem` can be used instead. |
| 173 | // router.StaticFileFS("favicon.ico", "./resources/favicon.ico", Dir{".", false}) |
nothing calls this directly
no test coverage detected