Permalink
Browse files

Remove gofn

  • Loading branch information...
1 parent ae3206b commit 254427b2e2f730bd1df2f384bcabbc7f9fbde046 @ascarter committed Jul 2, 2014
Showing with 0 additions and 28 deletions.
  1. +0 −28 Contents/Resources/gofn.sh
View
@@ -1,28 +0,0 @@
-upsearch () {
- local start_path=$1
- local go_path=$start_path
- while [[ "$go_path" != "" && ! -e "$go_path/$2" ]]; do
- go_path=${go_path%/*}
- done
- echo "$go_path"
-}
-
-# Execute go command from go path root using pkg path
-go_cmd() {
- local CMD=${1}
- local ARGS=
- local DOC=$2
- local DOC_PATH=`dirname ${DOC}`
- local GOPKGROOT=`upsearch $DOC_PATH src`
- local PKG_PATH=`echo ${DOC_PATH#$GOPKGROOT/src/}`
-
- if [[ "$CMD" == "run" ]]; then
- ARGS=${DOC}
- else
- ARGS=${PKG_PATH}
- fi
-
- cd $GOPKGROOT
- GOPATH=$GOPKGROOT go ${CMD} ${ARGS}
-
-}

0 comments on commit 254427b

Please sign in to comment.