Describe how to update golang dependencies

Signed-off-by: Andrei Vagin <avagin@google.com>
This commit is contained in:
Andrei Vagin
2023-10-12 21:42:33 -07:00
parent da90797f0c
commit c21f11d246
+19
View File
@@ -120,6 +120,25 @@ docker run --rm --runtime=my-branch --rm hello-world
make refresh
```
### Update golang dependencies
First, we need to update dependencies in the go.mod and go.sum files. To do
that, we should checkout the go branch and update dependencies using the go get
tool.
```bash
git checkout origin/go
go get golang.org/x/net
```
Next, we should checkout the master branch and update dependencies in the
WORKSPACE file using the Gazelle tool.
```bash
git checkout origin/master
bazel run //:gazelle -- update-repos -from_file=go.mod
```
### The small print
Contributions made by corporations are covered by a different agreement than the