1
0

No need to move to sub-tree to assets dir. Assets dir is in path.

This commit is contained in:
Alexander Andreev 2022-06-28 00:37:20 +04:00
parent 933eaa0f3c
commit 1506f1ac68
Signed by: Arav
GPG Key ID: 0388CC8FAA51063F

View File

@ -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) {