GetStaticFS returns a filesystem for static files, with all files situated in the root of the filesystem
()
| 27 | // GetStaticFS returns a filesystem for static files, with |
| 28 | // all files situated in the root of the filesystem |
| 29 | func 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 |
| 39 | func MustGetHTTP500ErrorPage() []byte { |