MCPcopy Create free account
hub / github.com/koding/kite / Square

Function Square

kontrol/kontrol_test.go:610–618  ·  view source on GitHub ↗
(r *kite.Request)

Source from the content-addressed store, hash-verified

608}
609
610func Square(r *kite.Request) (interface{}, error) {
611 a, err := r.Args.One().Float64()
612 if err != nil {
613 return nil, err
614 }
615
616 result := a * a
617 return result, nil
618}
619
620func TestGetQueryKey(t *testing.T) {
621 // This query is valid because there are no gaps between query fields.

Callers

nothing calls this directly

Calls 2

Float64Method · 0.80
OneMethod · 0.80

Tested by

no test coverage detected