Closed detailyang closed 5 years ago
Hello.
Now the hcl cannot set optional block via the struct tag as below:
type Block struct {} type Object struct { Block Block `hcl:"block,block,optional"` }
Hi @detailyang,
Currently the way to specify that is to make the field have type *Block, so that gohcl can set it to nil to indicate when the nested block isn't present.
*Block
gohcl
@apparentlymart Thanks. It works :)
Hello.
Now the hcl cannot set optional block via the struct tag as below: