For anyone interested:
mg.bat - a tool for easy building Go programs out of the main %GOPATH%
tree, on Windows.
USAGE: mg [COMMAND] [PACKAGE]
- COMMAND: local [default], test, run, help
- PACKAGE: Go package name, default: "."
Copies contents of current dir to fake GOPATH, then runs 'go' there.
NOTE: you can put 'goroot.txt' in current dir with contents to be put
in GOROOT variable. GOROOT\bin will be also added to PATH then.
- add subcommands, especially: install, clean (rmdir /q /s _gopath)
- add support for 'mgroot.txt' for faking import paths like
- add info that when importing, you must prefix with current dir name
- port the tool to Go?
In public domain, where available. For the rest of the world, choose
BSD license or the MIT/X11 one, whichever you prefer.
This was created because I like to keep my projects in c:\prog\*.*
(regardless if C++, Lua, Go or whatever), and for some time I felt
really bad each time I had to do some strange acrobatics to fit it
into confines of c:\prog\_gopath\src\github.com\akavel\foobar, or c:
\prog\foobar\src\github.com\akavel\foobar, juggling GOPATHs and/or:
"cmd.exe - Run as administrator" + "C:\prog\_gopath\src\github.com
\akavel> mklink /d foobar c:\prog\foobar". And I had headaches on
thought of cloning a project repo for some quick side work. This all
felt too much like in ye olde Java days, brrr.
Yes, I know there's gb, etc. For me, this one works better.
Thanks & Have fun,