Skip to content

Commit 00579f8

Browse files
committed
Revamp the README, and add the AUTHORS and CONTRIBUTORS files
1 parent c55cf50 commit 00579f8

File tree

5 files changed

+117
-21
lines changed

5 files changed

+117
-21
lines changed
File renamed without changes.

AUTHORS

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# This is the official list of go-diff authors for copyright purposes.
2+
# This file is distinct from the CONTRIBUTORS files.
3+
# See the latter for an explanation.
4+
5+
# Names should be added to this file as
6+
# Name or Organization <email address>
7+
# The email address is not required for organizations.
8+
9+
# Please keep the list sorted.
10+
11+
Danny Yoo <[email protected]>
12+
James Kolb <[email protected]>
13+
Jonathan Amsterdam <[email protected]>
14+
15+
Matt Kovars <[email protected]>
16+
Örjan Persson <[email protected]>
17+
Osman Masood <[email protected]>
18+
Robert Carlsen <[email protected]>
19+
Rory Flynn <[email protected]>
20+
Sergi Mansilla <[email protected]>
21+
Shatrugna Sadhu <[email protected]>
22+
Shawn Smith <[email protected]>
23+
Tor Arvid Lund <[email protected]>
24+
Zac Bergquist <[email protected]>

CONTRIBUTORS

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# This is the official list of people who can contribute
2+
# (and typically have contributed) code to the go-diff
3+
# repository.
4+
#
5+
# The AUTHORS file lists the copyright holders; this file
6+
# lists people. For example, ACME Inc. employees would be listed here
7+
# but not in AUTHORS, because ACME Inc. would hold the copyright.
8+
#
9+
# When adding J Random Contributor's name to this file,
10+
# either J's name or J's organization's name should be
11+
# added to the AUTHORS file.
12+
#
13+
# Names should be added to this file like so:
14+
# Name <email address>
15+
#
16+
# Please keep the list sorted.
17+
18+
Danny Yoo <[email protected]>
19+
James Kolb <[email protected]>
20+
Jonathan Amsterdam <[email protected]>
21+
22+
Matt Kovars <[email protected]>
23+
Örjan Persson <[email protected]>
24+
Osman Masood <[email protected]>
25+
Robert Carlsen <[email protected]>
26+
Rory Flynn <[email protected]>
27+
Sergi Mansilla <[email protected]>
28+
Shatrugna Sadhu <[email protected]>
29+
Shawn Smith <[email protected]>
30+
Tor Arvid Lund <[email protected]>
31+
Zac Bergquist <[email protected]>

LICENSE.txt renamed to LICENSE

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (c) 2012 Sergi Mansilla <[email protected]>
1+
Copyright (c) 2012-2016 The go-diff Authors. All rights reserved.
22

33
Permission is hereby granted, free of charge, to any person obtaining a
44
copy of this software and associated documentation files (the "Software"),

README.md

+61-20
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,81 @@
1-
# go-diff [![GoDoc](https://godoc.org/github.com/sergi/go-diff?status.png)](https://godoc.org/github.com/sergi/go-diff) [![Build Status](https://travis-ci.org/sergi/go-diff.svg?branch=master)](https://travis-ci.org/sergi/go-diff) [![Coverage Status](https://coveralls.io/repos/sergi/go-diff/badge.png?branch=master)](https://coveralls.io/r/sergi/go-diff?branch=master)
1+
# go-diff [![GoDoc](https://godoc.org/github.com/sergi/go-diff?status.png)](https://godoc.org/github.com/sergi/go-diff/diffmatchpatch) [![Build Status](https://travis-ci.org/sergi/go-diff.svg?branch=master)](https://travis-ci.org/sergi/go-diff) [![Coverage Status](https://coveralls.io/repos/sergi/go-diff/badge.png?branch=master)](https://coveralls.io/r/sergi/go-diff?branch=master)
22

3-
Go-diff is a Go language port of Neil Fraser's google-diff-match-patch code. His original code is available at:
3+
go-diff offers algorithms to perform operations required for synchronizing plain text:
44

5-
http://code.google.com/p/google-diff-match-patch/
5+
- Compare two texts and return their differences.
6+
- Perform fuzzy matching of text.
7+
- Apply patches onto text.
68

7-
## Current state for this Go library
9+
## Installation
810

9-
In order to run the tests:
11+
```bash
12+
go get -u github.com/sergi/go-diff/...
13+
```
1014

11-
`cd diff && go test`
15+
## Usage
1216

13-
## Installation
17+
The following example compares two texts and writes out the differences to standard output.
18+
19+
```go
20+
package main
21+
22+
import (
23+
"fmt"
24+
25+
"github.com/sergi/go-diff/diffmatchpatch"
26+
)
27+
28+
const (
29+
text1 = "Lorem ipsum dolor."
30+
text2 = "Lorem dolor sit amet."
31+
)
32+
33+
func main() {
34+
dmp := diffmatchpatch.New()
35+
36+
diffs := dmp.DiffMain(text1, text2, false)
37+
38+
fmt.Println(dmp.DiffPrettyText(diffs))
39+
}
40+
```
41+
42+
## Found a bug or are you missing a feature in go-diff?
43+
44+
Please make sure to have the latest version of go-diff. If the problem still persists go through the [open issues](https://github.com/sergi/go-diff/issues) in the tracker first. If you cannot find your request just open up a [new issue](https://github.com/sergi/go-diff/issues/new).
45+
46+
## How to contribute?
47+
48+
You want to contribute to go-diff? GREAT! If you are here because of a bug you want to fix or a feature you want to add, you can just read on. Otherwise we have a list of [open issues in the tracker](https://github.com/sergi/go-diff/issues). Just choose something you think you can work on and discuss your plans in the issue by commenting on it.
49+
50+
Please make sure that every behavioral change is accompanied by test cases. Additionally, every contribution must pass the `lint` and `test` Makefile targets which can be run using the following commands in the repository root directory.
51+
52+
```bash
53+
make lint
54+
make test
55+
```
56+
57+
After your contribution passes these commands, [create a PR](https://help.github.com/articles/creating-a-pull-request/) and we will review your contribution.
58+
59+
## Origins
1460

15-
go get github.com/sergi/go-diff/diffmatchpatch
61+
go-diff is a Go language port of Neil Fraser's google-diff-match-patch code. His original code is available at [http://code.google.com/p/google-diff-match-patch/](http://code.google.com/p/google-diff-match-patch/).
1662

1763
## Copyright and License
1864

19-
The original Google Diff, Match and Patch Library is licensed under
20-
the [Apache License 2.0](http://www.apache.org/licenses/LICENSE-2.0).
21-
The full terms of that license are included here in the
22-
`APACHE-LICENSE-2.0` file.
65+
The original Google Diff, Match and Patch Library is licensed under the [Apache License 2.0](http://www.apache.org/licenses/LICENSE-2.0). The full terms of that license are included here in the [APACHE-LICENSE-2.0](/APACHE-LICENSE-2.0) file.
2366

2467
Diff, Match and Patch Library
2568

26-
Written by Neil Fraser
27-
Copyright (c) 2006 Google Inc.
28-
<http://code.google.com/p/google-diff-match-patch/>
69+
> Written by Neil Fraser
70+
> Copyright (c) 2006 Google Inc.
71+
> <http://code.google.com/p/google-diff-match-patch/>
2972
30-
This Go version of Diff, Match and Patch Library is licensed under
31-
the [MIT License](http://www.opensource.org/licenses/MIT) (a.k.a.
32-
the Expat License) which is included here in the `LICENSE` file.
73+
This Go version of Diff, Match and Patch Library is licensed under the [MIT License](http://www.opensource.org/licenses/MIT) (a.k.a. the Expat License) which is included here in the [LICENSE](/LICENSE) file.
3374

3475
Go version of Diff, Match and Patch Library
3576

36-
Copyright (c) 2012 Sergi Mansilla <[email protected]>
37-
<https://github.com/sergi/go-diff>
77+
> Copyright (c) 2012-2016 The go-diff authors. All rights reserved.
78+
> <https://github.com/sergi/go-diff>
3879
3980
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
4081

0 commit comments

Comments
 (0)