# go-diff

> Diff, fuzzy match and patch plain text in Go

Source: https://talira.ai/catalog/go-diff-r9ts92ff
Every listing: https://talira.ai/catalog.md

- Kind: Open source
- Types: Library
- Categories: [libraries / text / diffing](https://talira.ai/categories/libraries/text/diffing), [languages / go](https://talira.ai/categories/languages/go)
- Licence: MIT AND Apache-2.0[^2][^3]
- Pricing: Free and open source[^1]
- Free tier: yes[^1]
- Backed by: [The go-diff authors](https://talira.ai/orgs/go-diff-authors.md)

go-diff is a Go port of Neil Fraser's google-diff-match-patch. Its diffmatchpatch package compares two texts and returns their differences (character- or line-level), finds a pattern in text by fuzzy matching, and creates and applies patches, the operations needed to keep plain text in sync. Its makers call it finished: bug fixes are released promptly and no new features are planned.

## Links

- GitHub: https://github.com/sergi/go-diff
- Docs: https://pkg.go.dev/github.com/sergi/go-diff/diffmatchpatch

## Problems it solves

- show what changed between two versions of a text in my Go program
- apply a text patch even when the target has drifted a little
- sync edits to a plain-text document between clients in Go

## Features

- compare two texts and return their differences
- line-level diffing
- fuzzy matching of a pattern in text
- create patches and apply them to text

## Trust

Overall: 0.53 out of 1.
Signals: maintenance 0.73, adoption 0.66, momentum 0.34, community 0.61, backing 0.30, extensibility 0.00.

- last commit 13 days ago
- 20 commits in the last 90 days
- latest release v1.4.5 13 days ago
- 2.1k GitHub stars
- 32 contributors
- backed by The go-diff authors

## Sources

[^1]: https://github.com/sergi/go-diff#readme (checked 28 Nov 2026)
[^2]: https://github.com/sergi/go-diff/blob/master/LICENSE (checked 28 Nov 2026)
[^3]: https://github.com/sergi/go-diff/blob/master/APACHE-LICENSE-2.0 (checked 28 Nov 2026)
