parse

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package parse implements diff parsers for each supported format.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func JSON added in v0.5.0

func JSON(a, b []byte) (*diffnode.Diff, error)

JSON computes a semantic diff between two JSON byte slices. It walks both parse trees simultaneously and produces a DiffNode tree.

func Terraform added in v0.5.0

func Terraform(data []byte) (*diffnode.Diff, error)

Terraform parses a Terraform plan JSON (from `terraform show -json`) and produces a DiffNode tree grouped by resource change.

func Text

func Text(a, b []byte, contextLines int) (*node.Diff, error)

Text computes a line-by-line diff between a and b using the Myers algorithm. contextLines controls how many unchanged lines surround each changed block.

func YAML added in v0.5.0

func YAML(a, b []byte) (*diffnode.Diff, error)

YAML computes a semantic diff between two YAML byte slices. It walks both yaml.Node trees simultaneously and produces a DiffNode tree.

Types

This section is empty.

Jump to

Keyboard shortcuts

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