hcl

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2020 License: MPL-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	OpReplace = 'r'
	OpDelete  = 'd'
	OpInsert  = 'i'
	OpEqual   = 'e'
)

Variables

This section is empty.

Functions

func Diff

func Diff(f filesystem.File, after []byte) filesystem.FileChanges

Diff calculates difference between File's content and after byte sequence and returns it as filesystem.FileChanges

func IsNoBlockFoundErr added in v0.3.0

func IsNoBlockFoundErr(err error) bool

Types

type InvalidHclPosErr

type InvalidHclPosErr struct {
	Pos     hcllib.Pos
	InRange hcllib.Range
}

func (*InvalidHclPosErr) Error

func (e *InvalidHclPosErr) Error() string

type NoBlockFoundErr

type NoBlockFoundErr struct {
	AtPos hcllib.Pos
}

func (*NoBlockFoundErr) Error

func (e *NoBlockFoundErr) Error() string

type NoTokenFoundErr added in v0.3.0

type NoTokenFoundErr struct {
	AtPos hcllib.Pos
}

func (*NoTokenFoundErr) Error added in v0.3.0

func (e *NoTokenFoundErr) Error() string

type TokenizedBlock added in v0.3.0

type TokenizedBlock interface {
	TokenAtPosition(hcl.Pos) (hclsyntax.Token, error)
	Tokens() hclsyntax.Tokens
}

func NewTestBlock added in v0.3.0

func NewTestBlock(b []byte) (TokenizedBlock, error)

type TokenizedFile added in v0.3.0

type TokenizedFile interface {
	BlockAtPosition(hcl.Pos) (TokenizedBlock, error)
	TokenAtPosition(hcl.Pos) (hclsyntax.Token, error)
	PosInBlock(hcl.Pos) bool
}

func NewFile

func NewFile(f filesystem.File) TokenizedFile

func NewTestFile added in v0.3.0

func NewTestFile(b []byte) TokenizedFile

Jump to

Keyboard shortcuts

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