hcl

package
v1.4.4 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2022 License: MIT Imports: 2 Imported by: 4

Documentation

Overview

Package hcl implements a koanf.Parser that parses Hashicorp HCL bytes as conf maps.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HCL

type HCL struct {
	// contains filtered or unexported fields
}

HCL implements a Hashicorp HCL parser.

func Parser

func Parser(flattenSlices bool) *HCL

Parser returns an HCL Parser. flattenSlices flattens HCL structures where maps turn into lists of maps. Read more here: https://github.com/hashicorp/hcl/issues/162 It's recommended to turn this setting on.

func (*HCL) Marshal added in v0.9.0

func (p *HCL) Marshal(o map[string]interface{}) ([]byte, error)

Marshal marshals the given config map to HCL bytes.

func (*HCL) Unmarshal added in v0.9.0

func (p *HCL) Unmarshal(b []byte) (map[string]interface{}, error)

Unmarshal parses the given HCL bytes.

Jump to

Keyboard shortcuts

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