No need to move to sub-tree to assets dir. Assets dir is in path.
This commit is contained in:
parent
933eaa0f3c
commit
1506f1ac68
@ -2,7 +2,6 @@ package web
|
||||
|
||||
import (
|
||||
"embed"
|
||||
"io/fs"
|
||||
"net/http"
|
||||
)
|
||||
|
||||
@ -12,8 +11,7 @@ import (
|
||||
var assetsDir embed.FS
|
||||
|
||||
func Assets() http.FileSystem {
|
||||
f, _ := fs.Sub(assetsDir, "assets")
|
||||
return http.FS(f)
|
||||
return http.FS(assetsDir)
|
||||
}
|
||||
|
||||
func AssetsGetFile(path string) ([]byte, error) {
|
||||
|
Loading…
Reference in New Issue
Block a user