goveal/fs/layered.go
Peter Kurfer 82a651cd5d
First draft of new fiber based server
- replaced previous net/http based muxer and all other components with fiber
- replaced polling with SSE to handle file changes
- auto-update custom stylesheets
- natively support mermaid diagrams
- handle custom element attributes for lists properly
- reload on config changes
- replace JS templating with actual JS code and an API
2021-12-22 11:52:02 +01:00

24 lines
328 B
Go

package fs
import (
"io/fs"
"os"
)
type FS = fs.FS
type File = fs.File
var Dir = os.DirFS
type Layered struct {
Layers []FS
}
func (l Layered) Open(name string) (file fs.File, err error) {
for idx := range l.Layers {
if file, err = l.Layers[idx].Open(name); err == nil {
return file, nil
}
}
return nil, err
}