Initial commit
This commit is contained in:
16
static/serveStatic.go
Normal file
16
static/serveStatic.go
Normal file
@@ -0,0 +1,16 @@
|
||||
//go:build serveStatic
|
||||
|
||||
package static
|
||||
|
||||
import (
|
||||
"embed"
|
||||
"net/http"
|
||||
)
|
||||
|
||||
//go:embed static/*
|
||||
var staticFS embed.FS
|
||||
|
||||
func InitHttpHandlers() {
|
||||
fs := http.FileServerFS(staticFS)
|
||||
http.Handle("/static/", http.StripPrefix("/static", fs))
|
||||
}
|
Reference in New Issue
Block a user