var DefaultConfig = Config{ SpacesWidth: 2, }
func Format(src []byte) ([]byte, error)
Format formats src HCL and returns the result.
func Fprint(output io.Writer, node ast.Node) error
Fprint "pretty-prints" an HCL node to output It calls Config.Fprint with default settings.
type ByPosition []*ast.CommentGroup
func (b ByPosition) Len() int
func (b ByPosition) Less(i, j int) bool
func (b ByPosition) Swap(i, j int)
A Config node controls the output of Fprint.
type Config struct { SpacesWidth int // if set, it will use spaces instead of tabs for alignment }
func (c *Config) Fprint(output io.Writer, node ast.Node) error