<#19394 How are you supposed to deal with duplicat...
# github-notifications
c
#19394 How are you supposed to deal with duplicate names? New discussion created by rdeusser 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:
Copy code
test
├── BUILD
├── Dockerfile
├── go.mod
└── main.go
pants tailor ::
generates the
BUILD
file to look like this:
Copy code
go_binary(
    name="bin",
)

docker_image(
    name="docker",
)

go_mod()

go_package(
    name="test0",
)
If I run
pants package test
it builds a Docker image with a name of
docker
. I could just rename it to
test
, but that won't work because
go_mod()
has a default name of
test
and I also want the binary to have a name of
test
. If I copy the
test
target as is in the Dockerfile to
/usr/local/bin
, the binary ends up as
/usr/local/bin/test/bin
which is kind of weird. Playing hot potato with names isn't ideal, but I'm not sure if there is a better way. pantsbuild/pants