3 ms·
If you do Go development, you can do this to quickly get to root folder of any Go package: function gocd { cd `go list -f '{{.Dir}}' $1` } It uses t
by shurcooL 12y ago
If you do Go development, you can do this to quickly get to root folder of any Go package:
function gocd {
cd `go list -f '{{.Dir}}' $1`
}
It uses the same syntax as go list to specify packages, so you can do, e.g.:
~ $ gocd .../markdownfmt
markdownfmt $ pwd
/Users/Dmitri/Dropbox/Work/2013/GoLand/src/github.com/shurcooL/markdownfmt
markdownfmt $ _
So nice.