Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: pmezard/go-difflib
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v1.0.0
Choose a base ref
...
head repository: pmezard/go-difflib
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 5d4384e
Choose a head ref
  • 4 commits
  • 2 files changed
  • 2 contributors

Commits on Jan 2, 2018

  1. Update README.md

    justbuchanan authored Jan 2, 2018

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    4d7e5c1 View commit details

Commits on Dec 26, 2018

  1. Copy the full SHA
    1ef1646 View commit details
  2. Copy the full SHA
    fca3d27 View commit details
  3. Merge pull request #10 from justbuchanan/master

    Fixed minor mistake in readme example
    pmezard authored Dec 26, 2018

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    5d4384e View commit details
Showing with 6 additions and 8 deletions.
  1. +0 −5 .travis.yml
  2. +6 −3 README.md
5 changes: 0 additions & 5 deletions .travis.yml

This file was deleted.

9 changes: 6 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
go-difflib
==========

[![Build Status](https://travis-ci.org/pmezard/go-difflib.png?branch=master)](https://travis-ci.org/pmezard/go-difflib)
THIS PACKAGE IS NO LONGER MAINTAINED.

At this point, I have no longer the time nor the interest to work on go-difflib. I apologize for the inconvenience.

[![GoDoc](https://godoc.org/github.com/pmezard/go-difflib/difflib?status.svg)](https://godoc.org/github.com/pmezard/go-difflib/difflib)

Go-difflib is a partial port of python 3 difflib package. Its main goal
@@ -26,14 +29,14 @@ Diffs are configured with Unified (or ContextDiff) structures, and can
be output to an io.Writer or returned as a string.

```Go
diff := UnifiedDiff{
diff := difflib.UnifiedDiff{
A: difflib.SplitLines("foo\nbar\n"),
B: difflib.SplitLines("foo\nbaz\n"),
FromFile: "Original",
ToFile: "Current",
Context: 3,
}
text, _ := GetUnifiedDiffString(diff)
text, _ := difflib.GetUnifiedDiffString(diff)
fmt.Printf(text)
```