Go 1.16 introduces the fs package and a FS interface. Implementing a Jet loader for this seems like an ideal use case. Are there any plans for this, would it be easy?
EDIT: actually, maybe it is as simple as this?
type StdFileSystemLoader struct{ fs.FS }
func (l StdFileSystemLoader) Open(templatePath string) (io.ReadCloser, error) {
return l.FS.Open(templatePath)
}
func (l StdFileSystemLoader) Exists(templatePath string) bool {
_, err := l.Open(templatePath)
return err == nil && !os.IsNotExist(err)
}