My folder structure is correct, i can both run go install
from inside the package folder and from anywhere in the system, adding the package (folder) name after
I came to this question with a different problem so hopefully this helps someone. This isn't answering this question specifically, but it does answer for me at least why no binary file was being made.
Let's say your directory structure looks like this:
.go/
bin/
pkg/
src/
github.com/
banool/
myapp/
file.go
server.go
cmd/
myapp/
main.go
I had to run these two commands:
go build github.com/banool/myapp/...
go build github.com/banool/myapp/cmd/...
After this my binary appeared under myapp/
.
Obviously this is a very different situation to the answer above, but I came to this question with such a situation, where I had run go get
to get some Go source and I didn't know how to build it. Hopefully this helps people stumbling across this question with that problem :)