Documentation ¶
Overview ¶
Package hclv2 is driver use HCL format content as config source
about HCL, please see https://github.com/hashicorp/hcl docs for HCL v2 https://pkg.go.dev/github.com/hashicorp/hcl/v2
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Decoder config.Decoder = func(blob []byte, v any) (err error) { file, diags := hclsyntax.ParseConfig( blob, "hcl2/config.hcl", hcl.Pos{Line: 0, Column: 0}, ) if len(diags) != 0 { return diags } return gohcl.DecodeBody(file.Body, nil, v) }
Decoder the hcl content decoder
Driver instance for hcl
View Source
var Encoder config.Encoder = func(ptr any) (out []byte, err error) { err = errors.New("HCLv2: is not support encode data to HCL") return }
Encoder the hcl content encoder
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.