NewFunctionDoc creates a new Doc struct for documenting a function.
(name, description string, overloads ...*Doc)
| 129 | |
| 130 | // NewFunctionDoc creates a new Doc struct for documenting a function. |
| 131 | func NewFunctionDoc(name, description string, overloads ...*Doc) *Doc { |
| 132 | return &Doc{ |
| 133 | Kind: DocFunction, |
| 134 | Name: name, |
| 135 | Description: ParseDescription(description), |
| 136 | Children: overloads, |
| 137 | } |
| 138 | } |
| 139 | |
| 140 | // NewOverloadDoc creates a new Doc struct for a function example. |
| 141 | func NewOverloadDoc(id, signature string, examples ...*Doc) *Doc { |