MCPcopy Index your code
hub / github.com/dnote/dnote / GetStaticFS

Function GetStaticFS

pkg/server/assets/embed.go:29–36  ·  view source on GitHub ↗

GetStaticFS returns a filesystem for static files, with all files situated in the root of the filesystem

()

Source from the content-addressed store, hash-verified

27// GetStaticFS returns a filesystem for static files, with
28// all files situated in the root of the filesystem
29func GetStaticFS() (fs.FS, error) {
30 subFs, err := fs.Sub(staticFiles, "static")
31 if err != nil {
32 return nil, errors.Wrap(err, "getting sub filesystem")
33 }
34
35 return subFs, nil
36}
37
38// MustGetHTTP500ErrorPage returns the content of HTML file for HTTP 500 error
39func MustGetHTTP500ErrorPage() []byte {

Callers 1

NewRouterFunction · 0.92

Calls

no outgoing calls

Tested by

no test coverage detected