mirror of
https://github.com/longsleep/realtimetraffic.git
synced 2024-11-16 08:48:33 +01:00
22 lines
415 B
Go
22 lines
415 B
Go
package client
|
|
|
|
import (
|
|
"net/http"
|
|
|
|
"github.com/elazarl/go-bindata-assetfs"
|
|
)
|
|
|
|
//go:generate go-bindata -prefix "static/" -pkg client -o bindata.go static/...
|
|
|
|
func handler(w http.ResponseWriter, r *http.Request) {
|
|
http.FileServer(
|
|
&assetfs.AssetFS{
|
|
Asset: Asset,
|
|
AssetDir: AssetDir,
|
|
AssetInfo: AssetInfo,
|
|
Prefix: "/",
|
|
},
|
|
).ServeHTTP(w, r)
|
|
}
|
|
|
|
var HandlerFunc http.HandlerFunc = handler
|