()
| 327 | } |
| 328 | |
| 329 | func ExampleRequest_Respond() { |
| 330 | handler := func(req micro.Request) { |
| 331 | // respond to the request |
| 332 | if err := req.Respond(req.Data()); err != nil { |
| 333 | log.Fatal(err) |
| 334 | } |
| 335 | } |
| 336 | |
| 337 | fmt.Printf("%T", handler) |
| 338 | } |
| 339 | |
| 340 | func ExampleRequest_RespondJSON() { |
| 341 | type Point struct { |