MCPcopy Index your code
hub / github.com/labstack/echo / FileFS

Method FileFS

group.go:135–137  ·  view source on GitHub ↗

FileFS implements `Echo#FileFS()` for sub-routes within the Group. Avoid using the leading `/` slash as most of the Go standard library fs.FS implementations require relative paths for file operations.

(path, file string, filesystem fs.FS, m ...MiddlewareFunc)

Source from the content-addressed store, hash-verified

133// Avoid using the leading `/` slash as most of the Go standard library fs.FS implementations require relative paths for
134// file operations.
135func (g *Group) FileFS(path, file string, filesystem fs.FS, m ...MiddlewareFunc) RouteInfo {
136 return g.GET(path, StaticFileHandler(file, filesystem), m...)
137}
138
139// File implements `Echo#File()` for sub-routes within the Group. Panics on error.
140//

Callers

nothing calls this directly

Calls 2

GETMethod · 0.95
StaticFileHandlerFunction · 0.85

Tested by

no test coverage detected