godeps2bazel
takes a Godeps JSON file and
turns it into the equivalent bazel repository
commands.
It's handy to use alongside gazelle, the Go BUILD file generator.
Install with go get github.com/jmhodges/godeps2bazel
.
Run as godeps2bazel /path/to/Godeps.json
and copy the output into your
WORKSPACE (or wherever you're storing your repositories).
Be sure to add the rules_go repository
to your build and to include "new_go_repository"
in the load
call for
rules_go
where you store the output.