Registry / config / hashicorp-hcl-v2

hashicorp-hcl-v2

JSON →
library2.24.0gogounverified

A structured configuration language for Go applications, supporting native HCL and JSON syntax.

go get github.com/hashicorp/hcl/v2
INSTALL
IMPORT
SIG · HASHICORP-HCL-V2
H
hashicorp-hcl-v2
configgov2.24.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

hcl
github.com/hashicorp/hcl/v2

Decodes an HCL configuration file into a Go struct.

package main import ( "fmt" "github.com/hashicorp/hcl/v2/hclsimple" ) func main() { type Config struct { Name string `hcl:"name"` } var c Config err := hclsimple.DecodeFile("config.hcl", nil, &c) if err != nil { panic(err) } fmt.Println(c.Name) }
Debug
Known issues

No known issues recorded.

Upgrade
Version history
2.24.0latest on pkg.go.dev
Audit
Dependencies

No dependency data recorded yet.

Agent activity
30 hits · last 30 days
node
26
Amazon
1
OpenAI (training)
1
Resources
hashicorp-hcl-v2 — go get hashicorp-hcl-v2 · libregistry