hclutil

package
v1.4.4-changelog Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 15, 2023 License: MPL-2.0 Imports: 2 Imported by: 1

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL