go-proxy-bingai/web/web.go

20 lines
254 B
Go
Raw Normal View History

2023-05-04 11:29:40 +08:00
package web
import (
"embed"
"net/http"
"os"
)
2023-05-04 11:29:40 +08:00
//go:embed *
var webFS embed.FS
func GetWebFS() http.FileSystem {
debugMode := os.Getenv("Go-Proxy-BingAI-Debug")
if debugMode != "" {
return http.Dir("web")
} else {
return http.FS(webFS)
}
}