Documentation ¶
Index ¶
- Variables
- type Node
- func (n *Node) Get(key string) (val interface{}, err error)
- func (n *Node) GetString(key string) (val string, err error)
- func (n *Node) GetStringSlice(key string) (val []string, err error)
- func (n *Node) GetStrings() (vals []string, err error)
- func (n *Node) Group() string
- func (n *Node) ID() string
- func (n *Node) IsCase() bool
- func (n *Node) IsDefault() bool
- func (n *Node) IsModule() bool
- func (n *Node) Kind() string
- func (n *Node) Name() string
- func (n *Node) Source() string
- func (n *Node) String() string
- func (n *Node) Validate() error
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNotFound = errors.New("key does not exist")
ErrNotFound is returned from Get and friends when the key does not exist
Functions ¶
This section is empty.
Types ¶
type Node ¶
type Node struct { *ast.ObjectItem // contains filtered or unexported fields }
Node represents a node in the parsed module
func NewNode ¶
func NewNode(item *ast.ObjectItem) *Node
NewNode constructs a new Node from the given ObjectItem
func (*Node) GetStringSlice ¶
GetStringSlice retrieves a slice of string from the values
func (*Node) GetStrings ¶
GetStrings retrieves all the strings in the node
Click to show internal directories.
Click to hide internal directories.