Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Register ¶
func Register(ph Handler)
Register registers the given PathFS for the Schema that it returns There can only be one PathFS for a given Schema. It there is already a PathFS for a given Schema, the new PathFS is used instead (last wins). Schema is compiled as a regular expression and if it does not compile, it panics
Types ¶
type Handler ¶
type Handler interface { // the Schema that can be handled by the PathFS // it will be converted to a regular expression to match against the head of an absolute path Schema() string // GetFS receives an absolute path and returns a filesystem FS // that can handle the path or an error, if it could not handle it // for valid absolute paths with a head that starts with Schema() // GetFS should always return a working FS GetFS(abs path.Absolute) (fs.FS, error) }
Click to show internal directories.
Click to hide internal directories.