tree: 7d3e17462550bae3087c77db2ec2bdd74e5a5cab [path history] [tgz]
  1. patches/
  2. BUILD.bazel
  3. kubernetes_version_def.bzl
  4. README.md
  5. repositories.bzl
third_party/go/README.md

Go dependency managment

Status: managed by Gazelle.

.--------.
| go.mod |------------.
'--------'            |
    | go mod tidy     | bazel //:gazelle-update-repos
    V                 |
.--------.            |
| go.sum |-----------.|
'--------'            |
                      V
.---------------------------------.
| third_party/go/repositories.bzl |
'---------------------------------'
                      | bazel run //:gazelle
                      V
               .----------------.
               | **/BUILD.bazel |.
               '----------------'|
                '----------------'
                      | bazel build //...
                      V
               .-----------------.
               | build artifacts |
               '-----------------'

Updating and adding new dependencies

Add a Go dependency to your code, then:

$ go mod tidy
$ bazel run //:gazelle-update-repos

NOTE: currently the first part (go mod tidy) doesn't work without performing some in-place symlinking in the repository. TODO(lorenz): document this

Regenerating BUILDfiles

$ bazel run //:gazelle