mirror of
https://github.com/longsleep/realtimetraffic.git
synced 2024-11-16 00:38:32 +01:00
23 lines
415 B
Go
23 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
|