hcl2any

package
v0.0.0-...-6ef3c0b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 21, 2026 License: MIT Imports: 8 Imported by: 0

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

Constants

This section is empty.

Variables

This section is empty.

Functions

func Convert

func Convert(hf *hcl.File) (map[string]any, error)

Convert converts an HCL file to a map[string]any.

func ConvertBody

func ConvertBody(b *hclsyntax.Body) (map[string]any, error)

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

func DecodeBlock(b *hclsyntax.Block, out map[string]any) error

DecodeBlock decodes an HCL block into a preällocated map[string]any.

func DecodeBody

func DecodeBody(b *hclsyntax.Body, out map[string]any) error

DecodeBody decodes an HCL body into a preällocated map[string]any.

func Encode

func Encode(v any) (*hclwrite.File, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL