StaticFileFS works just like `StaticFile` but a custom `http.FileSystem` can be used instead. router.StaticFileFS("favicon.ico", "./resources/favicon.ico", Dir{".", false}) Gin by default uses: gin.Dir()
(relativePath, filepath string, fs http.FileSystem)
| 173 | // router.StaticFileFS("favicon.ico", "./resources/favicon.ico", Dir{".", false}) |
| 174 | // Gin by default uses: gin.Dir() |
| 175 | func (group *RouterGroup) StaticFileFS(relativePath, filepath string, fs http.FileSystem) IRoutes { |
| 176 | return group.staticFileHandler(relativePath, func(c *Context) { |
| 177 | c.FileFromFS(filepath, fs) |
| 178 | }) |
| 179 | } |
| 180 | |
| 181 | func (group *RouterGroup) staticFileHandler(relativePath string, handler HandlerFunc) IRoutes { |
| 182 | if strings.Contains(relativePath, ":") || strings.Contains(relativePath, "*") { |
nothing calls this directly
no test coverage detected