-
I may have missed something in the documentation somewhere, but how are duplicate names supposed to work? What I mean is, if I have a project that looks like this:
go_binary(
name="bin",
)
docker_image(
name="docker",
)
go_mod()
go_package(
name="test0",
) If I run |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hi, Assuming you've seen https://www.pantsbuild.org/docs/targets#target-addresses The To change the name of your |
Beta Was this translation helpful? Give feedback.
Hi,
Assuming you've seen https://www.pantsbuild.org/docs/targets#target-addresses
The
name
is to address that particular target only, and may be used by default by targets such asdocker_image
to produce the image name, but there are dedicated fields to customize the various parts that make up the final image name or binary output filename. See https://www.pantsbuild.org/docs/tagging-docker-images#setting-a-repository-name about how to tag docker images. There's a lot of flexibility to support many different use cases.To change the name of your
go_binary
there is aoutput_path
field if you don't want it to base it on the target name: https://www.pantsbuild.org/docs/reference-go_binary#co…