19 lines
375 B
Go
19 lines
375 B
Go
|
package public
|
||
|
|
||
|
import (
|
||
|
"github.com/GeertJohan/go.rice"
|
||
|
"net/http"
|
||
|
)
|
||
|
|
||
|
const (
|
||
|
CSSMountpoint = "/css/"
|
||
|
JSMountpoint = "/js/"
|
||
|
)
|
||
|
|
||
|
var (
|
||
|
cssBox = rice.MustFindBox("css")
|
||
|
jsBox = rice.MustFindBox("js")
|
||
|
JSHandler = http.StripPrefix(JSMountpoint, http.FileServer(jsBox.HTTPBox()))
|
||
|
CSSHandler = http.StripPrefix(CSSMountpoint, http.FileServer(cssBox.HTTPBox()))
|
||
|
)
|