Open implements Loader.Open() on top of an embed.FS.
(name string)
| 25 | |
| 26 | // Open implements Loader.Open() on top of an embed.FS. |
| 27 | func (l *embedFileSystemLoader) Open(name string) (io.ReadCloser, error) { |
| 28 | return l.fs.Open(path.Join(l.dir, path.Clean(filepath.ToSlash(name)))) |
| 29 | } |
| 30 | |
| 31 | // Exists implements Loader.Exists() on top of an embed.FS by trying to open the file. |
| 32 | func (l *embedFileSystemLoader) Exists(name string) bool { |