Registry / utility / hexops-gotextdiff

hexops-gotextdiff

JSON →
library1.0.3gogounverified

Package gotextdiff supports a pluggable diff algorithm.

go get github.com/hexops/gotextdiff
INSTALL
IMPORT
SIG · HEXOPS-GOTEXTDIFF
H
hexops-gotextdiff
utilitygov1.0.3
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

gotextdiff
github.com/hexops/gotextdiff

Compute and print a unified diff between two strings.

package main import ( "fmt" "github.com/hexops/gotextdiff" "github.com/hexops/gotextdiff/myers" ) func main() { a := "hello\nworld" b := "hello\ngo" edits := myers.ComputeEdits("", a, b) diff := fmt.Sprint(gotextdiff.ToUnified("a.txt", "b.txt", a, edits)) fmt.Println(diff) }
Debug
Known issues

No known issues recorded.

Upgrade
Version history
1.0.3latest on pkg.go.dev
Audit
Dependencies

No dependency data recorded yet.

Agent activity
8 hits · last 30 days
node
8
Resources
hexops-gotextdiff — go get hexops-gotextdiff · libregistry