Hacker News new | past | comments | ask | show | jobs | submit login

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.



Consider applying for YC's W25 batch! Applications are open till Nov 12.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: