node

package
v1.6.1 Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2026 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChangeKind

type ChangeKind int
const (
	Unchanged ChangeKind = iota
	Added
	Removed
	Modified
)

type Diff

type Diff struct {
	Format   Format
	FileA    string
	FileB    string
	Hunks    []Hunk
	Root     *DiffNode
	Added    int
	Removed  int
	Modified int
}

type DiffNode

type DiffNode struct {
	Kind     ChangeKind
	Path     string
	Key      string
	Index    int
	OldValue string
	NewValue string
	Children []*DiffNode
}

type Format

type Format int
const (
	FormatText Format = iota
	FormatJSON
	FormatYAML
	FormatTerraform
)

func (Format) String

func (f Format) String() string

type Hunk

type Hunk struct {
	OldStart int
	OldCount int
	NewStart int
	NewCount int
	Lines    []Line
}

type Line

type Line struct {
	Kind    ChangeKind
	OldNum  int
	NewNum  int
	Content string
}

Jump to

Keyboard shortcuts

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