Useful commands:
Generate deps.bzl (which contains all the go_repository)
bazel run //:gazelle — update-repos –from_file=go.mod –to_macro=deps.bzl%go_dependencies –build_file_proto_mode=disable
Automatically create build files
bazel run //:gazelle update — -repo_root .
Need following comment in WORKSPACE file so external go_repositories (in deps.bzl) are visible:
gazelle:go_visibility public