blob: 1b64c4b8e37ae48e4066092e79fa8db5bd37874f (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
package sfive
import (
"fmt"
"net/http"
"github.com/zenazn/goji"
"github.com/zenazn/goji/web"
)
func hello(c web.C, w http.ResponseWriter, r *http.Request) {
fmt.Fprintf(w, "Hello, %s!", c.URLParams["name"])
}
func (self StatsSinkServer) ServeWeb() {
goji.Get("/hello/:name", hello)
goji.Serve()
}
|