Skip to content

Commit e342f94

Browse files
committed
Vendor all external packages
Using Go 1.5 vendor experiment. See go/notes/vendor.md for more info.
1 parent 4ff48a3 commit e342f94

299 files changed

Lines changed: 105526 additions & 4 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎git-hooks/pre-commit‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
# This script does not handle file names that contain spaces.
1212

1313
check_go_fmt() {
14-
gofiles=$(git diff --cached --name-only --diff-filter=ACM | grep '.go$')
14+
gofiles=$(git diff --cached --name-only --diff-filter=ACM | grep '.go$' | grep -v go/vendor/)
1515
[ -z "$gofiles" ] && return 0
1616

1717
unformatted=$(gofmt -l $gofiles)
@@ -28,10 +28,10 @@ check_go_fmt() {
2828
}
2929

3030
check_go_vet() {
31-
gofiles=$(git diff --cached --name-only --diff-filter=ACM | grep '.go$')
31+
gofiles=$(git diff --cached --name-only --diff-filter=ACM | grep '.go$' | grep -v go/vendor/)
3232
[ -z "$gofiles" ] && return 0
3333

34-
warnings=$(go vet ./... 2>&1)
34+
warnings=$(go vet ./... 2>&1 | grep -v vendor)
3535
[ -z "$warnings" ] && return 0
3636

3737
# go vet found issues

‎go/Makefile‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ vet:
88
go vet ./...
99

1010
lint:
11-
golint ./... | grep -v comment | grep -v KeysById | grep -v "error should be the last type" || echo "Lint-free!"
11+
golint ./... | grep -v vendor | grep -v comment | grep -v KeysById | grep -v "error should be the last type" || echo "Lint-free!"
1212

1313
# to run splint, first do this: go get stathat.com/c/splint
1414
splint:

‎go/notes/vendor.md‎

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
## go 1.5 vendor
2+
3+
All external dependencies now live in
4+
5+
github.com/keybase/client/go/vendor
6+
7+
This complies with the Go 1.5 vendor experiment: golang.org/s/go15vendor
8+
9+
I used govendor to help with this:
10+
11+
https://github.com/kardianos/govendor
12+
13+
### Building keybase client:
14+
15+
go get github.com/keybase/client/go
16+
GO15VENDOREXPERIMENT=1 go install github.com/keybase/client/go/keybase
17+
18+
No external dependencies required.
19+
20+
Without the environment variable set, it will use the
21+
packages in your GOPATH like normal.
22+
23+
### Adding an external dependency
24+
25+
If you add a new external dependency, vendor it with:
26+
27+
GO15VENDOREXPERIMENT=1 govendor add github.com/kr/pretty
28+
29+
### Updating an external dependency
30+
31+
If you'd like to update the vendored version of a
32+
package:
33+
34+
GO15VENDOREXPERIMENT=1 govendor update github.com/keybase/go-jsonw
35+
36+
### Removing an external dependency
37+
38+
GO15VENDOREXPERIMENT=1 govendor remove github.com/codegangsta/cli
39+
40+
### Notes
41+
42+
The `keybase/client/protocol/go` package is an external
43+
package. Since it uses external packages that
44+
`keybase/client/go` also uses, it had to be placed in
45+
vendor as well.
46+
47+
If you change the protocol, you need to run this:
48+
49+
cd $GOPATH/github.com/keybase/client/go
50+
GO15VENDOREXPERIMENT=1 govendor update github.com/keybase/client/protocol/go
51+
52+
I tried to get around this, but it is necessary.
53+

‎go/vendor/github.com/PuerkitoBio/goquery/LICENSE‎

Lines changed: 12 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎go/vendor/github.com/PuerkitoBio/goquery/README.md‎

Lines changed: 113 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎go/vendor/github.com/PuerkitoBio/goquery/array.go‎

Lines changed: 103 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)