Documentation
¶
Overview ¶
Package source reads a SpecArch YAML file into a node tree that keeps the line of every value, and into the plain value the JSON Schema check needs.
Index ¶
- func Child(n *yaml.Node, token string) *yaml.Node
- func Deref(n *yaml.Node) *yaml.Node
- func EscapeToken(s string) string
- func IsScalar(n *yaml.Node) bool
- func Items(n *yaml.Node) []*yaml.Node
- func Key(n *yaml.Node, key string) *yaml.Node
- func Pointer(tokens ...string) string
- func Resolve(n *yaml.Node, tokens []string) (*yaml.Node, bool)
- func Str(n *yaml.Node) string
- func UnescapeToken(s string) string
- func ValueOf(n *yaml.Node) any
- type Doc
- type Pair
- type Problem
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Child ¶
Child returns the value under key in a mapping, or the item at an index in a sequence, following aliases; nil when there is none.
Types ¶
type Doc ¶
type Doc struct {
Root *yaml.Node // the top-level mapping, nil when the file did not parse
Value any // the same content as JSON values
Problems []Problem
}
Doc is one parsed file.
Click to show internal directories.
Click to hide internal directories.