How about making it installable by go get? Somebody who has trouble
installing the "real" pkg-config can just install the Go version into
his bin directory. When the go tool is running pkg-config, it could
use either the C or the Go version -- assuming the invocation is the
same.
> # go tool pkg-config --cflags --libs sqlite3
>
> This is pkg-goncfig that I written just now.
>
> https://gist.github.com/2233549
Looks very nice, thanks for this!
I think that you may be able to simplify the key/value parsing a bit
if you use strings.SplitN(line, "=", 2) instead of a regexp.
--Benny.
--
The first essential in chemistry is that you should perform practical
work and conduct experiments, for he who performs not practical work
nor makes experiments will never attain the least degree of mastery.
-- Abu Musa Jabir ibn Hayyan (721-815)
BTW if you need gnu flag semantics, you might want
to use launchpad.net/gnuflag, which has almost exactly
the same API as the standard flag package.