rules_go_dep

module
v0.0.0-...-1116a26 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 7, 2018 License: Apache-2.0

README

Go dep rules for Bazel

See go-dep-bazel-vscode-example for an example project.

Workspace rules

Generate Gopkg.lock file with dep init, and add following rules to your WORKSPACE file:

Refer to

http_archive(
    name = "com_github_scele_rules_go_dep",
    urls = ["https://github.com/scele/rules_go_dep/archive/70fa72816cae64f67634740bc6c0233f39b5d8c6.tar.gz"],
    strip_prefix = "rules_go_dep-70fa72816cae64f67634740bc6c0233f39b5d8c6",
    sha256 = "20eeac91a621af97a39e9e30848727d6c14c7d68fcf3fcc139e98e3c363b4661",
)

load("@com_github_scele_rules_go_dep//dep:dep.bzl", "dep_import")

dep_import(
    name = "godeps",
    gopkg_lock = "//:Gopkg.lock",
)
load("@godeps//:Gopkg.bzl", "go_deps")
go_deps()

This will load all go dependencies expressed in Gopkg.lock into your workspace.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL