OverloadExamples configures example expressions for the overload.
(examples ...string)
| 892 | |
| 893 | // OverloadExamples configures example expressions for the overload. |
| 894 | func OverloadExamples(examples ...string) OverloadOpt { |
| 895 | return func(o *OverloadDecl) (*OverloadDecl, error) { |
| 896 | o.doc = common.MultilineDescription(examples...) |
| 897 | return o, nil |
| 898 | } |
| 899 | } |
| 900 | |
| 901 | // UnaryBinding provides the implementation of a unary overload. The provided function is protected by a runtime |
| 902 | // type-guard which ensures runtime type agreement between the overload signature and runtime argument types. |