Skip to content

Commit

Permalink
fix doc
Browse files Browse the repository at this point in the history
  • Loading branch information
dsxack committed Jan 22, 2019
1 parent aadeddc commit efa1826
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions kit/transport/http/example_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@ func makeSomeEndpoint() endpoint.Endpoint {
}
}

var (
request *http.Request
responseWriter http.ResponseWriter
)

func ExampleMakeJSONRequestDecoder() {
kithttp.NewServer(
makeSomeEndpoint(),
Expand All @@ -35,4 +40,7 @@ func ExampleRecoveringMiddleware() {
)
handler = RecoveringMiddleware(handler, kithttp.DefaultErrorEncoder)
}

// do something with handler
handler.ServeHTTP(responseWriter, request)
}

0 comments on commit efa1826

Please sign in to comment.