hcl2json

package module
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: May 19, 2020 License: Apache-2.0 Imports: 12 Imported by: 0

README

hcl2json

This is a tool to convert from HCL to json, to make it easier for non-go applications and scripts to process HCL inputs (such as terraform config).

If passed the -pack option, it converts to the JSON pack format used by hclpack, which contains the original structure of the document. However, all it has for expressions is the source text, which isn't always very useful.

If no options are passed, it converts the provide native HCL file to an (almost) equivalent HCL JSON file. Note, however, that there are some corner cases where it may not be exactly equivalent, especially if the target application makes use of static analysis.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetHclJSON

func GetHclJSON(bytes []byte, filename string) (interface{}, error)

GetHclJSON is the main exported function

Types

This section is empty.

Jump to

Keyboard shortcuts

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