Issue Description
Checklist
Expected behaviour
As of Echo 4.6.1, we have the (*Echo).Static(prefix, root string) *Route method. With the advent of Go 1.16, we have the new fs.FS type which expands upon the older concept of http.Dir as used by http.FileServer, to allow serving of files from any FS-like location, not just on disk.
I think it would be logical for Echo to support this new standard as well. The simplest approach I think would be to add a StaticFS method, probably with the following signature:
func (e *Echo) StaticFS(prefix string, root fs.FS) *Route
Version/commit
v4.6.1
Issue Description
Checklist
Expected behaviour
As of Echo 4.6.1, we have the
(*Echo).Static(prefix, root string) *Routemethod. With the advent of Go 1.16, we have the new fs.FS type which expands upon the older concept of http.Dir as used by http.FileServer, to allow serving of files from any FS-like location, not just on disk.I think it would be logical for Echo to support this new standard as well. The simplest approach I think would be to add a
StaticFSmethod, probably with the following signature:Version/commit
v4.6.1