@@ -2,7 +2,6 @@ package web
22
33import (
44 "html/template"
5- "golang.org/x/net/context"
65 "net/http"
76 "goji.io/pat"
87 "github.com/op/go-logging"
@@ -30,20 +29,20 @@ func New() (r *Renderer,err error) {
3029}
3130
3231
33- func (r * Renderer ) Handle (ctx context. Context , w http.ResponseWriter , req * http.Request ) {
34- page := pat .Param (ctx , "page" )
35- r .HandlePage (page ,ctx , w ,req )
32+ func (r * Renderer ) Handle ( w http.ResponseWriter , req * http.Request ) {
33+ page := pat .Param (req , "page" )
34+ r .HandlePage (page ,w ,req )
3635}
37- func (r * Renderer ) HandleRoot (ctx context. Context , w http.ResponseWriter , req * http.Request ) {
36+ func (r * Renderer ) HandleRoot ( w http.ResponseWriter , req * http.Request ) {
3837 page := `index.html`
39- r .HandlePage (page ,ctx , w ,req )
38+ r .HandlePage (page ,w ,req )
4039}
4140
42- func (r * Renderer ) HandleStatus (ctx context. Context , w http.ResponseWriter , req * http.Request ) {
41+ func (r * Renderer ) HandleStatus ( w http.ResponseWriter , req * http.Request ) {
4342 r .render .JSON (w , http .StatusOK , map [string ]bool {"ok" : true })
4443}
4544
46- func (r * Renderer ) HandlePage (page string ,ctx context. Context , w http.ResponseWriter , req * http.Request ) {
45+ func (r * Renderer ) HandlePage (page string , w http.ResponseWriter , req * http.Request ) {
4746 t , err := r .getTpl (page )
4847 if err != nil {
4948 fmt .Fprintf (w , "Page %s not found, err:[%+v]" ,page ,err )
0 commit comments