Skip to content

Commit a12082f

Browse files
committed
Merge pull request #5 from sourcegraph/clarify-canonical-import-path
Clarify canonical import path, fix broken links.
2 parents 458f90e + f23a1b8 commit a12082f

File tree

3 files changed

+31
-8
lines changed

3 files changed

+31
-8
lines changed

.travis.yml

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,20 @@
11
language: go
22

3-
go: 1.3
3+
go:
4+
- 1.4
5+
6+
before_install:
7+
- mkdir -p $HOME/gopath/src/sourcegraph.com/sourcegraph
8+
- mv $TRAVIS_BUILD_DIR $HOME/gopath/src/sourcegraph.com/sourcegraph/go-diff
9+
- export TRAVIS_BUILD_DIR=$HOME/gopath/src/sourcegraph.com/sourcegraph/go-diff
10+
- cd $TRAVIS_BUILD_DIR
11+
12+
install:
13+
- go get golang.org/x/tools/cmd/vet
14+
15+
script:
16+
- export TZ=US/Pacific # TODO: Fix this.
17+
- go get -t -v ./...
18+
- diff -u <(echo -n) <(gofmt -d ./)
19+
- go tool vet ./
20+
- go test -v -race ./...

README.md

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,20 @@
1-
# go-diff [![status](https://sourcegraph.com/api/repos/github.com/sourcegraph/go-diff/.badges/status.png)](https://sourcegraph.com/github.com/sourcegraph/go-diff) [![views](https://sourcegraph.com/api/repos/github.com/sourcegraph/go-diff/.counters/views.png)](https://sourcegraph.com/github.com/sourcegraph/go-diff)
1+
# go-diff [![Build Status](https://travis-ci.org/sourcegraph/go-diff.svg?branch=master)](https://travis-ci.org/sourcegraph/go-diff) [![status](https://sourcegraph.com/api/repos/sourcegraph.com/sourcegraph/go-diff/.badges/status.png)](https://sourcegraph.com/sourcegraph.com/sourcegraph/go-diff) [![views](https://sourcegraph.com/api/repos/sourcegraph.com/sourcegraph/go-diff/.counters/views.png)](https://sourcegraph.com/sourcegraph.com/sourcegraph/go-diff)
22

33
Diff parser and printer for Go.
44

55
**Unstable API:** go-diff is currently in development. If you depend on it, you should vendor it.
66

7-
It doesn't actually compute a diff. It only reads in (and prints out,
8-
given a Go struct representation) unified diff output, such as the
9-
following. The corresponding data structure in Go is the
10-
[diff.FileDiff](https://sourcegraph.com/github.com/sourcegraph/go-diff/.GoPackage/github.com/sourcegraph/go-diff/diff/.def/FileDiff)
11-
struct.
7+
Installing
8+
----------
9+
10+
```bash
11+
go get -u sourcegraph.com/sourcegraph/go-diff/diff
12+
```
13+
14+
Usage
15+
-----
16+
17+
It doesn't actually compute a diff. It only reads in (and prints out, given a Go struct representation) unified diff output, such as the following. The corresponding data structure in Go is the [`diff.FileDiff`](https://sourcegraph.com/sourcegraph.com/sourcegraph/go-diff/.GoPackage/sourcegraph.com/sourcegraph/go-diff/diff/.def/FileDiff) struct.
1218

1319
```diff
1420
--- oldname 2009-10-11 15:12:20.000000000 -0700

diff/doc.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
// Package diff provides a parser for unified diffs.
2-
package diff
2+
package diff // import "sourcegraph.com/sourcegraph/go-diff/diff"

0 commit comments

Comments
 (0)