NewFieldDoc creates a new Doc struct for documenting a struct field.
(name, celType, description string, examples ...*Doc)
| 167 | |
| 168 | // NewFieldDoc creates a new Doc struct for documenting a struct field. |
| 169 | func NewFieldDoc(name, celType, description string, examples ...*Doc) *Doc { |
| 170 | return &Doc{ |
| 171 | Kind: DocField, |
| 172 | Name: name, |
| 173 | Type: celType, |
| 174 | Description: description, |
| 175 | Children: examples, |
| 176 | } |
| 177 | } |
| 178 | |
| 179 | // Documentor is an interface for types that can provide their own documentation. |
| 180 | type Documentor interface { |
no outgoing calls