NewMacroDoc creates a new Doc struct for documenting a macro.
(name, description string, examples ...*Doc)
| 149 | |
| 150 | // NewMacroDoc creates a new Doc struct for documenting a macro. |
| 151 | func NewMacroDoc(name, description string, examples ...*Doc) *Doc { |
| 152 | return &Doc{ |
| 153 | Kind: DocMacro, |
| 154 | Name: name, |
| 155 | Description: ParseDescription(description), |
| 156 | Children: examples, |
| 157 | } |
| 158 | } |
| 159 | |
| 160 | // NewExampleDoc creates a new Doc struct specifically for holding an example. |
| 161 | func NewExampleDoc(ex string) *Doc { |