A first-party Go module (corresponding to a `go.mod
` file).
Generates `go_first_party_package
` targets for each directory from the `package_sources
` field, and generates `go_third_party_package
` targets based on the `require
` directives in your `go.mod
`.
If you have third-party packages, make sure you have an up-to-date `go.sum
`. Run `go mod tidy
` directly to update your `go.mod
` and `go.sum
`.
## <code>description</code>
<span style="color: purple">type: <code>str | None</code></span> <span style="color: green">default: <code>None</code></span>
A human-readable description of the target.
Use `./pants list --documented ::
` to see all targets with descriptions.
## <code>package_sources</code>
<span style="color: purple">type: <code>Iterable[str] | None</code></span> <span style="color: green">default: <code>('**/*.go', '**/*.s')</code></span>
What sources to generate `go_first_party_package
` targets for.
Pants will generate one target per matching directory.
Pants does not yet support some file types like `.c
` and `.h
` files, along with cgo files. If you need to use these files, please open a feature request at https://github.com/pantsbuild/pants/issues/new/choose so that we know to prioritize adding support.
## <code>tags</code>
<span style="color: purple">type: <code>Iterable[str] | None</code></span> <span style="color: green">default: <code>None</code></span>
Arbitrary strings to describe a target.
For example, you may tag some test targets with 'integration_test' so that you could run `./pants --tag='integration_test' test ::
` to only run on targets with that tag.