MCPcopy Create free account
hub / github.com/aiprodcoder/MIXAPI / EmbedFolder

Function EmbedFolder

common/embed-file-system.go:24–32  ·  view source on GitHub ↗
(fsEmbed embed.FS, targetPath string)

Source from the content-addressed store, hash-verified

22}
23
24func 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}

Callers 1

SetWebRouterFunction · 0.92

Calls

no outgoing calls

Tested by

no test coverage detected