Using Go on Windows, whenever I execute go run myprog.go
from the console, Go builds a new executable with a random name somewhere on my C drive.
Is there a way to configure it so it will always build the file to a specific location, and preferably to also avoid the randomness of the name? (i.e., always build to D:\Temp\LastBuild.exe).
I was able to find some info that did not help when doing go help run
and go help build
. The latter had an output flag -o outfile
but it is not accepted in go run
.
Any help is appreciated.