Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BlocksAsAttrs ¶
func BlocksAsAttrs(body hcl.Body) hcl.Body
BlocksAsAttrs rewrites the hcl.Body so that hcl blocks are treated as attributes when schema is unknown.
This conversion is necessary for parsing task driver configs, as they can be arbitrary nested without pre-defined schema.
More concretely, it changes the following:
```
config { meta { ... } }
```
to
```
config { meta = { ... } # <- attribute now }
```
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.