writer

package
v0.0.0-...-8e52ff2 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2024 License: MPL-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func UpdateContent

func UpdateContent(b []byte, updates Updates) ([]byte, error)

UpdateContent update the original content with a series of updates. Each update shall has no overlap range with others, and the range has to be within the original content.

Types

type Update

type Update struct {
	Range   hcl.Range
	Content []byte
}

type Updates

type Updates []Update

func (Updates) Len

func (u Updates) Len() int

func (Updates) Less

func (u Updates) Less(i int, j int) bool

func (Updates) Swap

func (u Updates) Swap(i int, j int)

Jump to

Keyboard shortcuts

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