Skip to content

Commit efa1826

Browse files
committed
fix doc
1 parent aadeddc commit efa1826

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

kit/transport/http/example_test.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,11 @@ func makeSomeEndpoint() endpoint.Endpoint {
1717
}
1818
}
1919

20+
var (
21+
request *http.Request
22+
responseWriter http.ResponseWriter
23+
)
24+
2025
func ExampleMakeJSONRequestDecoder() {
2126
kithttp.NewServer(
2227
makeSomeEndpoint(),
@@ -35,4 +40,7 @@ func ExampleRecoveringMiddleware() {
3540
)
3641
handler = RecoveringMiddleware(handler, kithttp.DefaultErrorEncoder)
3742
}
43+
44+
// do something with handler
45+
handler.ServeHTTP(responseWriter, request)
3846
}

0 commit comments

Comments
 (0)