Exemple #1
0
func main() {

	err := cgi.Serve(http.HandlerFunc(handler))

	if err != nil {
		view.ViewFail("request")
	}

}
Exemple #2
0
func handler(w http.ResponseWriter, r *http.Request) {

	r.Header.Set("Content-Type:", "text/html; charset=UTF-8")
	handle, err := routing(r.URL.Path)
	if err != nil {
		view.ViewFail(err.Error())
	}
	handle(w, r)
}