hcl

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2020 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Parser

type Parser interface {
	Parse(src []byte) (*ast.File, error)
}

type Printer

type Printer interface {
	Fprint(output io.Writer, node ast.Node) error
}

type Service

type Service struct{}

Service is an ad-hoc abstraction used to cover-up HashiCorp's bad abstraction that is not dependency injectable.

func NewHclService

func NewHclService() *Service

func (*Service) Fprint

func (s *Service) Fprint(output io.Writer, node ast.Node) error

Fprint pretty-prints (writes) HCL specified `node` in specified `output`

func (*Service) Parse

func (s *Service) Parse(src []byte) (*ast.File, error)

Parse parses HCL or JSON marshaled bytes and return HCL AST

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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