FAQ
For anyone interested:

mg.bat - a tool for easy building Go programs out of the main %GOPATH%
tree, on Windows.

SOURCE: https://gist.github.com/3713260

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.

TODO:
- add subcommands, especially: install, clean (rmdir /q /s _gopath)
- add support for 'mgroot.txt' for faking import paths like
"github.com/username/proj"
- add info that when importing, you must prefix with current dir name
OTHER IDEAS:
- 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,
/Mateusz Czapliński.

--

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupgolang-nuts @
categoriesgo
postedSep 24, '12 at 3:39p
activeSep 24, '12 at 3:39p
posts1
users1
websitegolang.org

1 user in discussion

Mateusz Czapliński: 1 post

People

Translate

site design / logo © 2021 Grokbase