MCPcopy Index your code
hub / github.com/koding/kite / Square

Function Square

kite_test.go:497–507  ·  view source on GitHub ↗

Returns the result. Also tests reverse call.

(r *Request)

Source from the content-addressed store, hash-verified

495
496// Returns the result. Also tests reverse call.
497func 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
509var ErrNegative = errors.New("negative argument")
510

Callers

nothing calls this directly

Calls 4

MustFloat64Method · 0.80
OneMethod · 0.80
InfoMethod · 0.80
GoMethod · 0.80

Tested by

no test coverage detected