mirror of
https://gitea.com/Lydanne/buildx.git
synced 2026-01-16 19:04:16 +08:00
12 lines
229 B
Go
12 lines
229 B
Go
package bake
|
|
|
|
import "github.com/hashicorp/hcl/v2/hclsimple"
|
|
|
|
func ParseHCL(dt []byte, fn string) (*Config, error) {
|
|
var c Config
|
|
if err := hclsimple.Decode(fn, dt, nil, &c); err != nil {
|
|
return nil, err
|
|
}
|
|
return &c, nil
|
|
}
|