Skip to content

Commit

Permalink
docs: Mention that gazelle:prefix can be replaced by go.mod
Browse files Browse the repository at this point in the history
  • Loading branch information
fmeum authored May 31, 2023
1 parent b8d560e commit d3f4576
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion docs/go/core/bzlmod.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,11 +75,12 @@ If you have a use case that would require this, please explain it in an issue.

## Generating BUILD files

Add the following to your top-level BUILD file, including your Go module's path in a [Gazelle directive](https://github.com/bazelbuild/bazel-gazelle#directives):
Add the following to your top-level BUILD file, including your Go module's path in a [Gazelle directive](https://github.com/bazelbuild/bazel-gazelle#directives) if there is no `go.mod` file with that information in the same directory:

```starlark
load("@gazelle//:def.bzl", "gazelle")

# The next line is only needed without a go.mod file.
# gazelle:prefix github.com/example/project
gazelle(name = "gazelle")
```
Expand Down

0 comments on commit d3f4576

Please sign in to comment.