tfvars_parser

package module
v0.0.0-...-bfb8293 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2023 License: BSD-2-Clause Imports: 10 Imported by: 1

README

tfvars-parser

HCL2 TFVars file parser Go module for parsing TFVars file inspired by https://github.com/tmccombs/hcl2json/tree/main/convert

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Bytes

func Bytes(bytes []byte, filename string, options Options) ([]byte, error)

Bytes takes the contents of an HCL file, as bytes, and converts them into a JSON representation of the HCL file.

func ConvertFile

func ConvertFile(file *hcl.File, options Options) (jsonObj, error)

func ConvertFileContent

func ConvertFileContent(fileContent []byte, filePath string) (map[string]interface{}, error)

func File

func File(file *hcl.File, options Options) ([]byte, error)

File takes an HCL file and converts it to its JSON representation.

Types

type Options

type Options struct {
	Simplify bool
}

Jump to

Keyboard shortcuts

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