Go is a terminal utility that allows you to go to directories far from your current directory. One need only type the name of the directory, and go will search for it and take you there.
Go uses the variable $GOPATH to determine where it will search for directories. It will search those directories in the order they appear, just like your environment $PATH variable. Open up the go file in a text editor to change the $GOPATH to fit your computer. You may also change the depth that go searches.
Here is the code in its entirety:
# state the desired paths that go will search in. The default depth to search in each path is 4, but this may be changed in find_go()
# input each path on a separate line
# given path and dir, run find. if nonempty, take the first entry, cd, pwd, exit
until [ -z "$2" ] # concatenate args with a space
DIR="$DIR $2"; shift
FINDS=$(find "$SPATH" -maxdepth $DEPTH -name "$DIR" 2>/dev/null)
IFS=$'\n' # interpolation necessary b/c '' will make \ and n field separators.
for FIND in $FINDS # although this is a loop, the goal is to take the first entry if there is one
# cd to first entry, pwd, exit
return 0 # success! we found the match!
return 1 # failure. we didn't find it in this path.
for SPATH in $GOPATH # foreach path, go to the inputted directory if possible
find_go "$SPATH" $@ && return # if we successfully went to the directory, exit the program