Consider a package with multiple binaries with the same name, "cmd" in this 
case:

pkg1/cmd/main.go:
package main; import "fmt"; func main() { fmt.Println("pkg1") }

pkg2/cmd/main.go:
package main; import "fmt"; func main() { fmt.Println("pkg2") }

When running
  $ go install ./...
I would expect to get an error (or at least a warning) that the binaries 
conflict: there can only be one file called "cmd" in $GOBIN. However, "go 
install ./..." silently ignores the duplicate. One of the binaries "wins" 
and the other is lost.

For reference, the "cp" command in GNU Coreutils prints a warning when this 
occurs:
  $ cp pkg1/cmd/main.go pkg2/cmd/main.go .
  cp: will not overwrite just-created './main.go' with 'pkg2/cmd/main.go'

Would the Go team be interested in a fix for this?

Cheers,
Tom

-- 
This message is for the attention of the intended recipient(s) only. It may 
contain confidential, proprietary and/or legally privileged information. 
Use, disclosure and/or retransmission of information contained in this 
email may be prohibited. If you are not an intended recipient, you are 
kindly asked to notify the sender immediately (by reply e-mail) and to 
permanently delete this message. Thank you.

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to