31

My binaries end up in the src folder and I have no idea why. I want them to end up in gopath/bin (since that is the default? and since I don't want binaries on git). The packages end up in gopath/pkg with their binaries in their respective folder. I don't even know if this folder structure is considered good.

Gopath is set to the gopath folder on the D:\ drive, and gobin is not set.

go setup

Filip Haglund
  • 13,919
  • 13
  • 64
  • 113

2 Answers2

32

If you can pass a command line parameter to LiteIDE's go build instruction, you can do something like this;

go build -o $GOPATH/bin/outputfile.exe source.go

Hiranya
  • 421
  • 4
  • 2
20

As you can see in the liteIDE FAQ:

<action id="BuildAndRun" img="blue/buildrun.png" key="Ctrl+R;Ctrl+F7" task="Build;Run"/> <action id="Install" menu="Build" img="blue/install.png" key="Ctrl+F8" cmd="$(GO)" args="install $(INSTALLARGS)" save="all" output="true"/>

  • Build And Run is a go build.
  • Install is go install

Only the latter would build your exe in GOPATH/bin.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250