File implements `Echo#File()` for sub-routes within the Group. Panics on error. Avoid using the leading `/` slash as most of the Go standard library fs.FS implementations require relative paths for file operations.
(path, file string, middleware ...MiddlewareFunc)
| 141 | // Avoid using the leading `/` slash as most of the Go standard library fs.FS implementations require relative paths for |
| 142 | // file operations. |
| 143 | func (g *Group) File(path, file string, middleware ...MiddlewareFunc) RouteInfo { |
| 144 | handler := func(c *Context) error { |
| 145 | return c.File(file) |
| 146 | } |
| 147 | return g.Add(http.MethodGet, path, handler, middleware...) |
| 148 | } |
| 149 | |
| 150 | // RouteNotFound implements `Echo#RouteNotFound()` for sub-routes within the Group. |
| 151 | // |