(fsys fs.FS)
| 37 | } |
| 38 | |
| 39 | func mustNames(fsys fs.FS) []string { |
| 40 | var names []string |
| 41 | walkDirFunc := func(path string, d fs.DirEntry, err error) error { |
| 42 | if !d.IsDir() { |
| 43 | names = append(names, path) |
| 44 | } |
| 45 | return nil |
| 46 | } |
| 47 | if err := fs.WalkDir(fsys, ".", walkDirFunc); err != nil { |
| 48 | panic("assetNames failure: " + err.Error()) |
| 49 | } |
| 50 | return names |
| 51 | } |
| 52 | |
| 53 | // NewTemplateFileSystem returns a macaron.TemplateFileSystem instance for embedded assets. |
| 54 | // The argument "dir" can be used to serve subset of embedded assets. Template file |
no test coverage detected