Back to godoc.org

Package hcl

v0.2.1
Latest Go to latest

The latest major version is .

Published: Mar 5, 2020 | License: Apache-2.0 | Module: github.com/sumup-oss/vaulted

Index

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

Package Files

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier