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

Function NewExampleDoc

common/doc.go:161–166  ·  view source on GitHub ↗

NewExampleDoc creates a new Doc struct specifically for holding an example.

(ex string)

Source from the content-addressed store, hash-verified

159
160// NewExampleDoc creates a new Doc struct specifically for holding an example.
161func NewExampleDoc(ex string) *Doc {
162 return &Doc{
163 Kind: DocExample,
164 Description: ex,
165 }
166}
167
168// NewFieldDoc creates a new Doc struct for documenting a struct field.
169func NewFieldDoc(name, celType, description string, examples ...*Doc) *Doc {

Callers 3

DocumentationMethod · 0.92
DocumentationMethod · 0.92
TestNewDocFunction · 0.85

Calls

no outgoing calls

Tested by 1

TestNewDocFunction · 0.68