Created
December 27, 2016 15:18
-
-
Save bkcsoft/231fc680d2706b50f72a6846621aafa3 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
PATHS=( `find $GOPATH/src -type d -name ${1} | sed "s;$GOPATH/src/;;"` ) | |
for path in "${PATHS[@]}"; do | |
[[ ${path} =~ /vendor/ ]] && continue | |
test="${GOPATH}/src/${path}/.git" | |
if [[ -d "$GOPATH/src/${path}/.git" ]]; then | |
echo $path | |
fi | |
done |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[bkc@bkc-work] $ gofind cli | |
github.com/codegangsta/cli | |
github.com/urfave/cli | |
[bkc@bkc-work] $ find $GOPATH/src -type d -name cli | sed "s;$GOPATH/src/;;" | |
github.com/gogits/gogs/vendor/github.com/urfave/cli | |
github.com/Masterminds/glide/vendor/github.com/codegangsta/cli | |
github.com/likexian/whois-go/cli | |
github.com/codegangsta/cli | |
github.com/derekparker/delve/Documentation/cli | |
github.com/gpmgo/gopm/modules/cli | |
github.com/urfave/cli | |
github.com/minio/minio/vendor/github.com/minio/cli | |
gogs.fulkod.se/BirdieScene/vote-system/vendor/github.com/urfave/cli | |
code.gitea.io/gitea/vendor/github.com/urfave/cli | |
gitlab.com/gitlab-org/gitlab-ci-multi-runner/helpers/cli | |
gitlab.com/gitlab-org/gitlab-ci-multi-runner/vendor/github.com/codegangsta/cli |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment