Homebrew/homebrew — pull request #27164 by paulhammond (2014-03-03 19:21:36+00:00)
Title: Go: Don't put cross-compile artifacts in bin

This pull request cleans up the `/usr/local/bin` symlinks added by the Go formula.

The current Go formula creates symlinks for everything in `/usr/local/Cellar/go/1.2.1/libexec/bin`. This directory also includes subdirectories containing cross compiled executables, such as `/usr/local/Cellar/go/1.2.1/libexec/bin/windows_386/go.exe`. These subdirectories get symlinked into `/usr/local/bin`:

```
$ ls -l /usr/local/bin/ | grep go/1.2.1
lrwxr-xr-x 1 ph admin 33 Mar 3 10:21 darwin_386 -> ../Cellar/go/1.2.1/bin/darwin_386
lrwxr-xr-x 1 ph admin 25 Mar 3 10:21 go -> ../Cellar/go/1.2.1/bin/go
lrwxr-xr-x 1 ph admin 28 Mar 3 10:21 gofmt -> ../Cellar/go/1.2.1/bin/gofmt
lrwxr-xr-x 1 ph admin 32 Mar 3 10:21 linux_386 -> ../Cellar/go/1.2.1/bin/linux_386
lrwxr-xr-x 1 ph admin 34 Mar 3 10:21 linux_amd64 -> ../Cellar/go/1.2.1/bin/linux_amd64
lrwxr-xr-x 1 ph admin 32 Mar 3 10:21 linux_arm -> ../Cellar/go/1.2.1/bin/linux_arm
lrwxr-xr-x 1 ph admin 34 Mar 3 10:21 windows_386 -> ../Cellar/go/1.2.1/bin/windows_386
lrwxr-xr-x 1 ph admin 36 Mar 3 10:21 windows_amd64 -> ../Cellar/go/1.2.1/bin/windows_amd64
```

These symlinks shouldn't be created - they don't point to executable scripts and they're not well named. This pull request fixes that behavior so that only `go` and `gofmt` are symlinked:

```
$ ls -l /usr/local/bin | grep go/1.2.1
lrwxr-xr-x 1 ph admin 25 Mar 3 11:07 go -> ../Cellar/go/1.2.1/bin/go
lrwxr-xr-x 1 ph admin 28 Mar 3 11:07 gofmt -> ../Cellar/go/1.2.1/bin/gofmt
```