Returns the result. Also tests reverse call.
(r *Request)
| 495 | |
| 496 | // Returns the result. Also tests reverse call. |
| 497 | func Square(r *Request) (interface{}, error) { |
| 498 | a := r.Args.One().MustFloat64() |
| 499 | result := a * a |
| 500 | |
| 501 | r.LocalKite.Log.Info("Kite call, sending result '%f' back\n", result) |
| 502 | |
| 503 | // Reverse method call |
| 504 | r.Client.Go("foo", "bar") |
| 505 | |
| 506 | return result, nil |
| 507 | } |
| 508 | |
| 509 | var ErrNegative = errors.New("negative argument") |
| 510 |
nothing calls this directly
no test coverage detected