Skip to content

Instantly share code, notes, and snippets.

@dchest
Created April 13, 2011 02:31
Show Gist options
  • Save dchest/916858 to your computer and use it in GitHub Desktop.
Save dchest/916858 to your computer and use it in GitHub Desktop.
docgo - Runs godoc with the current path and opens browser (on a Mac).
#!/bin/sh
#
# Runs godoc with the current path and opens browser (on a Mac).
#
godoc -http=":8888" -path="." 2> /dev/null &
pid=$!
trap 'kill $pid' INT
open "http://localhost:8888"
wait $pid
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment