github.com/grafana/pyroscope@v1.18.0/public/assets.go (about) 1 //go:build !embedassets 2 // +build !embedassets 3 4 package public 5 6 import ( 7 "net/http" 8 9 httputil "github.com/grafana/pyroscope/pkg/util/http" 10 ) 11 12 var AssetsEmbedded = false 13 14 func Assets() (http.FileSystem, error) { 15 return http.Dir("./public/build"), nil 16 } 17 18 func NewIndexHandler(_ string) (http.HandlerFunc, error) { 19 return func(w http.ResponseWriter, r *http.Request) { 20 _, err := w.Write([]byte("This route is not available in dev mode.")) 21 if err != nil { 22 httputil.Error(w, err) 23 } 24 }, nil 25 }