rodaine / hclencoder

HCL Encoder/Marshaller - Convert Go Types into HCL files
https://godoc.org/github.com/rodaine/hclencoder
MIT License
77 stars 32 forks source link

Support "label" in hcl v2 #20

Open DeviaVir opened 4 years ago

DeviaVir commented 4 years ago

In my hcl v2 support story, it additionally looks like key is now label. When trying to use a struct for the in and out, using label for reading works in hcl v2, but hclencoder doesn't speak it. This PR allows it to see label as an alias for key.

Paired with https://github.com/rodaine/hclencoder/pull/19 it brings hclencoder one step closer to compatibility with hcl v2.