Browse Source

Reformat comment in docs

Carl Jackson 12 years ago
parent
commit
bed37a46c7
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      web/web.go

+ 2
- 1
web/web.go View File

@ -56,7 +56,8 @@ use the Env parameter to pass data to other middleware and to the final handler:
handler := func(w http.ResponseWriter, r *http.Request) { handler := func(w http.ResponseWriter, r *http.Request) {
cookie, err := r.Cookie("user") cookie, err := r.Cookie("user")
if err == nil { if err == nil {
//Consider using the middleware EnvInit instead of repeating the below check
// Consider using the middleware EnvInit instead
// of repeating the below check
if c.Env == nil { if c.Env == nil {
c.Env = make(map[string]interface{}) c.Env = make(map[string]interface{})
} }


Loading…
Cancel
Save