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
Types ¶
type InvalidHclPosErr ¶
func (*InvalidHclPosErr) Error ¶
func (e *InvalidHclPosErr) Error() string
type NoBlockFoundErr ¶
func (*NoBlockFoundErr) Error ¶
func (e *NoBlockFoundErr) Error() string
type NoTokenFoundErr ¶ added in v0.3.0
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
Click to show internal directories.
Click to hide internal directories.