MCPcopy Create free account
hub / github.com/compozy/agh / newEmbeddedStaticFS

Function newEmbeddedStaticFS

internal/api/httpapi/static.go:32–44  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

30}
31
32func newEmbeddedStaticFS() (staticSourceFS, error) {
33 staticFS, err := fs.Sub(webassets.DistFS, webassets.DistDir)
34 if err != nil {
35 return staticSourceFS{}, fmt.Errorf("embedded web bundle directory %q: %w", webassets.DistDir, err)
36 }
37 if _, err := fs.Stat(staticFS, "index.html"); err != nil {
38 return staticSourceFS{}, fmt.Errorf("embedded web bundle missing index.html: %w", err)
39 }
40 return staticSourceFS{
41 fs: staticFS,
42 source: fmt.Sprintf("embedded %s/%s", "github.com/compozy/agh-web-assets", webassets.DistDir),
43 }, nil
44}
45
46func newLocalStaticFS(dir string) (staticSourceFS, error) {
47 absDir, err := filepath.Abs(dir)

Callers 1

newStaticFSFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected