Browse Source

Minor documentation touch-ups

Carl Jackson 11 years ago
parent
commit
8b50302744
1 changed files with 3 additions and 3 deletions
  1. +3
    -3
      web/web.go

+ 3
- 3
web/web.go View File

@ -1,5 +1,5 @@
/* /*
Package web is a microframework inspired by Sinatra.
Package web implements a fast and flexible middleware stack and mux.
The underlying philosophy behind this package is that net/http is a very good The underlying philosophy behind this package is that net/http is a very good
HTTP library which is only missing a few features. If you disagree with this HTTP library which is only missing a few features. If you disagree with this
@ -41,8 +41,8 @@ Bind parameters using either Sinatra-like patterns or regular expressions:
Middleware are functions that wrap http.Handlers, just like you'd use with raw Middleware are functions that wrap http.Handlers, just like you'd use with raw
net/http. Middleware functions can optionally take a context parameter, which net/http. Middleware functions can optionally take a context parameter, which
will be threaded throughout the middleware stack and to the final handler, even will be threaded throughout the middleware stack and to the final handler, even
if not all of these things do not support contexts. Middleware are encouraged to
use the Env parameter to pass data to other middleware and to the final handler:
if not all of these things support contexts. Middleware are encouraged to use
the Env parameter to pass data to other middleware and to the final handler:
m.Use(func(h http.Handler) http.Handler { m.Use(func(h http.Handler) http.Handler {
handler := func(w http.ResponseWriter, r *http.Request) { handler := func(w http.ResponseWriter, r *http.Request) {


Loading…
Cancel
Save