16 lines
280 B
Go
16 lines
280 B
Go
|
package ui
|
||
|
|
||
|
import (
|
||
|
"net/http"
|
||
|
)
|
||
|
|
||
|
const StaticRoute = "/static/"
|
||
|
|
||
|
type StaticController struct {
|
||
|
}
|
||
|
|
||
|
func (sc *StaticController) ServeHTTP(w http.ResponseWriter, r *http.Request) {
|
||
|
fs := http.FileServer(http.Dir("./static"))
|
||
|
http.StripPrefix(StaticRoute, fs).ServeHTTP(w, r)
|
||
|
}
|