Documentation
¶
Overview ¶
Package hcl2any is a version of github.com/hashicorp/hcl/cmd/hcldec that doesn't require a schema to decode HCL2 files. It does not yet support every data type that HCL2 supports.
Index ¶
- func Convert(hf *hcl.File) (map[string]any, error)
- func ConvertBody(b *hclsyntax.Body) (map[string]any, error)
- func ConvertExpression(e hclsyntax.Expression) (any, error)
- func DecodeBlock(b *hclsyntax.Block, out map[string]any) error
- func DecodeBody(b *hclsyntax.Body, out map[string]any) error
- func Encode(v any) (*hclwrite.File, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConvertBody ¶
ConvertBody converts an HCL body to a map[string]any.
func ConvertExpression ¶
func ConvertExpression(e hclsyntax.Expression) (any, error)
ConvertExpression converts an HCL expression to a Go value.
func DecodeBlock ¶
DecodeBlock decodes an HCL block into a preällocated map[string]any.
func DecodeBody ¶
DecodeBody decodes an HCL body into a preällocated map[string]any.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.