Skip to content

Instantly share code, notes, and snippets.

@ivan3bx
Created July 15, 2017 23:20
Show Gist options
  • Save ivan3bx/d88a0e78ffa143747b3789790915e885 to your computer and use it in GitHub Desktop.
Save ivan3bx/d88a0e78ffa143747b3789790915e885 to your computer and use it in GitHub Desktop.
Replacement expression for 'glide novendor' that returns list of packages suitable as arguments to `go test`
#
# select unique directories with *.go files
# and appends "/..." ("foo/bar.go" → "./foo/...")
#
find . -type f -name \*go -maxdepth 2 -exec dirname {} \; | uniq | sed 's/\([a-z]\)$/\1\/.../'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment