hcl

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

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

Go to latest
Published: Nov 23, 2021 License: MIT Imports: 2 Imported by: 0

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

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

Marshal marshals the given config map to HCL bytes.

func (*HCL) Unmarshal

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