I have this folder structure for my fib
package:
$ tree
.
└── src
└── fib
├── fib
│ └── main.go
├── fib.go
└── fib_test.go
(main.go
is in package main
, fib(_test).go
is in package fib
)
GOPATH is set to $PWD/src
, GOBIN is set to $PWD/bin
. When I run go install fib/fib
, I get a file called fib
in the directory bin
(this is what I expect):
$ tree bin/
bin/
└── fib
But when I set GOOS
or GOARCH
, the directory in the form GOOS_GOARCH
is created:
$ GOARCH=386 GOOS=windows go install fib/fib
$ tree bin/
bin/
└── windows_386
└── fib.exe
This is not what I want. I'd like to have the file fib.exe
in the bin
directory, not in the sub directory bin/windows_386
.
(How) is this possible?