MCPcopy Create free account
hub / github.com/cel-expr/cel-go / NewMacroDoc

Function NewMacroDoc

common/doc.go:151–158  ·  view source on GitHub ↗

NewMacroDoc creates a new Doc struct for documenting a macro.

(name, description string, examples ...*Doc)

Source from the content-addressed store, hash-verified

149
150// NewMacroDoc creates a new Doc struct for documenting a macro.
151func 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.
161func NewExampleDoc(ex string) *Doc {

Callers 2

DocumentationMethod · 0.92
TestNewDocFunction · 0.85

Calls 1

ParseDescriptionFunction · 0.85

Tested by 1

TestNewDocFunction · 0.68