Skip to main content
Version: 2.16 (deprecated)


Allow files and sources produced by the targets specified by inputs to be consumed by rules that specifically expect a GoPackageSourcesField.

Note that this target does not modify the files in any way. If outputs is not specified, all files with the following extensions will be matched: .go, .s, .S, .sx, .c, .h, .hh, .hpp, .hxx, .cc, .cpp, .cxx, .m, .f, .F, .for, .f90, .syso

This target must be explicitly specified as a dependency of any target that requires it. Sources from this target will not be automatically inferred as dependencies.

This target is experimental: in future versions of Pants, this functionality may be made available with a different interface.

Backend: pants.backend.experimental.go



The input targets that are to be made available by this target.


str | None
default: None

A human-readable description of the target.

Use pants list --documented :: to see all targets with descriptions.


Iterable[str] | None
default: None

The output files that are made available in the new context by this target. If not specified, the target will capture all files with the expected extensions for this source format: see the help for the target for the specific extensions. If no extensions are specified and this value is not specified, all input files will be returned.


Iterable[str] | None
default: None

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.