Files
invertergui/plugins/webui/static/binary.go
Nicholas Thompson d3576031bb Use go native embed lib for static assets
Use built in embed library to serve static files instead of the statik library
2021-04-23 22:33:14 +02:00

15 lines
252 B
Go

package static
import (
"embed"
"net/http"
)
//go:embed css js index.html favicon.ico
var content embed.FS
// New exports the static part of the webgui that is served via embed
func New() http.Handler {
return http.FileServer(http.FS(content))
}