1
// hello.go ported for appengine
3
// this differs from the standard hello.go example in two ways: appengine
4
// already provides an http server for you, obviating the need for the
5
// ListenAndServe call (with associated logging), and the package must not be
6
// called main (appengine reserves package 'main' for the underlying program).
14
"github.com/bmizerany/pat"
17
// hello world, the web server
18
func HelloServer(w http.ResponseWriter, req *http.Request) {
19
io.WriteString(w, "hello, "+req.URL.Query().Get(":name")+"!\n")
24
m.Get("/hello/:name", http.HandlerFunc(HelloServer))
26
// Register this pat with the default serve mux so that other packages
27
// may also be exported. (i.e. /debug/pprof/*)