Closed
Description
I'm not sure if this rises to a proposal or not.
Many tools (e.g. make, git) have a universal -C <dir>
flag which lets you do things in other directories without pushd/popd silliness. Given how go uses CWD for important things like modules, it would be nice to have something like this in go. For example go -C path/to/dir list
gives me the package-path. Otherwise it's things like pushd path/to/dir >/dev/null; go list; popd >/dev/null
.
It's really just a convenience thing. Has it already been discussed? I couldn't find it.