diff

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: May 18, 2026 License: MIT Imports: 1 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           LineType `json:"type"`
	BaseLineNum    *int     `json:"baseLineNum"`
	CurrentLineNum *int     `json:"currentLineNum"`
	Text           string   `json:"text"`
}

DiffLine は差分の1行を表す

type DiffResult

type DiffResult struct {
	HasDiff         bool       `json:"hasDiff"`
	BaseWorktree    string     `json:"baseWorktree"`
	CurrentWorktree string     `json:"currentWorktree"`
	Lines           []DiffLine `json:"lines"`
}

DiffResult は差分計算の結果を表す

func ComputeDiff

func ComputeDiff(baseText, currentText, baseWorktree, currentWorktree string) *DiffResult

ComputeDiff は2つのテキストの差分を計算する

type LineType

type LineType string

LineType は差分の行タイプを表す

const (
	LineUnchanged LineType = "unchanged"
	LineAdded     LineType = "added"
	LineRemoved   LineType = "removed"
)

Jump to

Keyboard shortcuts

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