yudai / gojsondiff

Go JSON Diff
Other
535 stars 81 forks source link

Revendor all deps with gvt #17

Closed ryboe closed 7 years ago

ryboe commented 7 years ago

Sorry for the large PR ๐Ÿ™‡, but there's nothing optional here if we want to get gojsondiff in a buildable state. With the exception of urfave/cli, all the revendored code is identical to the godep vendored code, so I would consider this PR low-risk ๐Ÿ™.

How to update deps with gvt

go get -u github.com/FiloSottile/gvt
cd $GOPATH/src/github.com/yudai/gojsondiff
gvt delete github.com/foo/bar

# use --branch, --tag, or --revision flag if you want a specific version of bar
gvt fetch github.com/foo/bar

Why gvt is better than godep

While we wait for the official dep tool from the Go team, Glide and gvt are the best we've got. gvt is the simpler of the two and more appropriate for a small project like this IMHO. It works just like go get, but you can specify a --branch, --tag, or --revision. godep was the first popular vendoring tool for Go, but it has two fatal flaws:

  1. It copies pkgs from the global pool of code in your $GOPATH, which is always changing
  2. It doesn't do what you expect (See #16).
yudai commented 7 years ago

Thanks!

ryboe commented 7 years ago

๐Ÿ™‡