Documentation ¶
Index ¶
- Variables
- func Def(r adt.Runtime, pkgID string, v *adt.Vertex) (*ast.File, errors.Error)
- func Expr(r adt.Runtime, pkgID string, n adt.Expr) (ast.Expr, errors.Error)
- func ExtractDeclAttrs(v *adt.Vertex) (attrs []*ast.Attribute)
- func ExtractDoc(v *adt.Vertex) (docs []*ast.CommentGroup)
- func ExtractFieldAttrs(v *adt.Vertex) (attrs []*ast.Attribute)
- func Value(r adt.Runtime, pkgID string, n adt.Value) (ast.Expr, errors.Error)
- func Vertex(r adt.Runtime, pkgID string, n *adt.Vertex) (*ast.File, errors.Error)
- func VertexFeatures(v *adt.Vertex) []adt.Feature
- type Profile
- func (p *Profile) Def(r adt.Runtime, pkgID string, v *adt.Vertex) (*ast.File, errors.Error)
- func (p *Profile) Expr(r adt.Runtime, pkgID string, n adt.Expr) (ast.Expr, errors.Error)
- func (p *Profile) Value(r adt.Runtime, pkgID string, n adt.Value) (ast.Expr, errors.Error)
- func (p *Profile) Vertex(r adt.Runtime, pkgID string, n *adt.Vertex) (*ast.File, errors.Error)
Constants ¶
This section is empty.
Variables ¶
View Source
var All = &Profile{ Simplify: true, ShowOptional: true, ShowDefinitions: true, ShowHidden: true, ShowDocs: true, ShowAttributes: true, }
View Source
var Final = &Profile{ Simplify: true, TakeDefaults: true, Final: true, }
View Source
var Raw = &Profile{ ShowOptional: true, ShowDefinitions: true, ShowHidden: true, ShowDocs: true, }
View Source
var Simplified = &Profile{ Simplify: true, ShowDocs: true, }
Functions ¶
func ExtractDoc ¶
func ExtractDoc(v *adt.Vertex) (docs []*ast.CommentGroup)
ExtractDoc collects documentation strings for a field.
Comments are attached to a field with a field shorthand belong to the child node. So in the following the comment is attached to field bar.
// comment foo: bar: 2
Types ¶
type Profile ¶
type Profile struct { Simplify bool // Final reports incomplete errors as errors. Final bool // TakeDefaults is used in Value mode to drop non-default values. TakeDefaults bool ShowOptional bool ShowDefinitions bool // ShowHidden forces the inclusion of hidden fields when these would // otherwise be omitted. Only hidden fields from the current package are // included. ShowHidden bool ShowDocs bool ShowAttributes bool // ShowErrors treats errors as values and will not percolate errors up. ShowErrors bool }
Click to show internal directories.
Click to hide internal directories.