#! go-cgi
package main
import (
"fmt"
"net/http"
"net/http/cgi"
)
func main() {
cgi.Serve(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
w.Header().Set("Content-Type", "text/plain; charset=utf-8")
fmt.Fprintf(w, "Hello %s", r.FormValue("name"))
}))
}
// vim: ft=go:
Yasuhiro Matsumoto
under the MIT License: http://mattn.mit-license.org/2014