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 (
|
import (
|
||||||
"embed"
|
"embed"
|
||||||
"io/fs"
|
|
||||||
"net/http"
|
"net/http"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -12,8 +11,7 @@ import (
|
|||||||
var assetsDir embed.FS
|
var assetsDir embed.FS
|
||||||
|
|
||||||
func Assets() http.FileSystem {
|
func Assets() http.FileSystem {
|
||||||
f, _ := fs.Sub(assetsDir, "assets")
|
return http.FS(assetsDir)
|
||||||
return http.FS(f)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func AssetsGetFile(path string) ([]byte, error) {
|
func AssetsGetFile(path string) ([]byte, error) {
|
||||||
|
Loading…
Reference in New Issue
Block a user