🚚 Moved assets to web/static
5
main.go
|
@ -16,6 +16,7 @@ import (
|
||||||
"net/url"
|
"net/url"
|
||||||
"os"
|
"os"
|
||||||
"os/signal"
|
"os/signal"
|
||||||
|
"path/filepath"
|
||||||
"runtime"
|
"runtime"
|
||||||
"runtime/pprof"
|
"runtime/pprof"
|
||||||
"strings"
|
"strings"
|
||||||
|
@ -106,7 +107,7 @@ var (
|
||||||
//nolint:gochecknoglobals
|
//nolint:gochecknoglobals
|
||||||
var cpuProfilePath, memProfilePath string
|
var cpuProfilePath, memProfilePath string
|
||||||
|
|
||||||
//go:embed assets/*
|
//go:embed web/static/*
|
||||||
var staticFS embed.FS
|
var staticFS embed.FS
|
||||||
|
|
||||||
//nolint:gochecknoinits
|
//nolint:gochecknoinits
|
||||||
|
@ -156,7 +157,7 @@ func main() {
|
||||||
var opts NewAppOptions
|
var opts NewAppOptions
|
||||||
|
|
||||||
var err error
|
var err error
|
||||||
if opts.Static, err = fs.Sub(staticFS, "assets"); err != nil {
|
if opts.Static, err = fs.Sub(staticFS, filepath.Join("web", "static")); err != nil {
|
||||||
logger.Fatalln(err)
|
logger.Fatalln(err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Before Width: | Height: | Size: 6.6 KiB After Width: | Height: | Size: 6.6 KiB |
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 20 KiB |
Before Width: | Height: | Size: 5.8 KiB After Width: | Height: | Size: 5.8 KiB |
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 15 KiB |
Before Width: | Height: | Size: 492 B After Width: | Height: | Size: 492 B |