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 install
.
For example, my workspace is the following:
Go\
bin\
pkg\
src\
name\
file.go
then, if i run
cd %GOPATH%\src\name
go install
or
go install name
no errors are generated and my workspace becomes the following
Go\
bin\
pkg\
windows_amd64\ <-- new!
name.a <-- new!
src\
name\
file.go
Package files are correctly created, but bin files aren't.
My go env is the following:
C:\Users\...>go env
set GOARCH=amd64
set GOBIN=C:\Users\myname\Documents\Go\bin
set GOCHAR=6
set GOEXE=.exe
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GOOS=windows
set GOPATH=C:\Users\myname\Documents\Go
set GORACE=
set GOROOT=C:\Go
set GOTOOLDIR=C:\Go\pkg\tool\windows_amd64
set CC=gcc
set GOGCCFLAGS=-m64 -mthreads -fmessage-length=0
set CXX=g++
set CGO_ENABLED=1
Why is this the case? Am i missing something, doing something wrong? I want bin files to be created along with package files.