(fsEmbed embed.FS, targetPath string)
| 22 | } |
| 23 | |
| 24 | func EmbedFolder(fsEmbed embed.FS, targetPath string) static.ServeFileSystem { |
| 25 | efs, err := fs.Sub(fsEmbed, targetPath) |
| 26 | if err != nil { |
| 27 | panic(err) |
| 28 | } |
| 29 | return embedFileSystem{ |
| 30 | FileSystem: http.FS(efs), |
| 31 | } |
| 32 | } |