package
0.0.0-20191002203319-fb75b3253c80
Repository: https://github.com/hashicorp/hcl2.git
Documentation: pkg.go.dev

# Functions

Format takes source code and performs simple whitespace changes to transform it to a canonical layout style.
NewBlock constructs a new, empty block with the given type name and labels.
NewEmptyFile constructs a new file with no content, ready to be mutated by other calls that append to its body.
NewExpressionAbsTraversal constructs an expression that represents the given traversal, which must be absolute or this function will panic.
NewExpressionLiteral constructs an an expression that represents the given literal value.
NewFile creates a new file object that is empty and ready to have constructs added t it.
ParseConfig interprets the given source bytes into a *hclwrite.File.
TokensForTraversal returns a sequence of tokens that represents the given traversal.
TokensForValue returns a sequence of tokens that represents the given constant value.

# Structs

Token is a single sequence of bytes annotated with a type.
Traversal represents a sequence of variable, attribute, and/or index operations.

# Type aliases

Tokens is a flat list of tokens.