18 lines
236 B
Go
18 lines
236 B
Go
//go:build !dev
|
|
|
|
package main
|
|
|
|
import (
|
|
"embed"
|
|
"io/fs"
|
|
"net/http"
|
|
)
|
|
|
|
//go:embed public/*
|
|
var publicFiles embed.FS
|
|
|
|
func publicHandler() http.Handler {
|
|
sub, _ := fs.Sub(publicFiles, "public")
|
|
return http.FileServer(http.FS(sub))
|
|
}
|