diff

package
v0.1.10 Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DiffLine

type DiffLine struct {
	Type    string // "add", "del", "ctx" (context/unchanged)
	Content string
}

DiffLine represents a single line in the diff output.

type Result

type Result struct {
	Lines []DiffLine
}

Result holds the diff between two flows.

func Compare

func Compare(meta1 *store.FlowMeta, data1 *store.FlowData, meta2 *store.FlowMeta, data2 *store.FlowData) *Result

Compare produces a diff between two flows.

func (*Result) HasChanges

func (r *Result) HasChanges() bool

HasChanges returns true if there are any additions or deletions.

func (*Result) Render

func (r *Result) Render(color bool) string

Render returns a string representation of the diff. If color is true, uses ANSI color codes.

Jump to

Keyboard shortcuts

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