Add links to godoc (#183) Also add an example for `http.Adapt`. Fixes #182
1 file changed, 8 insertions(+), 0 deletions(-)
changed files
M http/handler_test.go → http/handler_test.go
@@ -112,3 +112,11 @@ t.Fatal(err) } return result.StatusCode, string(body) } + +func ExampleAdapt() { + h := ghttp.Adapt(func(w http.ResponseWriter, r *http.Request) (g.Node, error) { + return g.El("div"), nil + }) + mux := http.NewServeMux() + mux.Handle("/", h) +}