go list
という便利コマンドがあるので、利用すると簡単に取得できる。
$ go list -f="{{if .TestGoFiles}}{{.ImportPath}}{{end}}" ./...
以前の自分はShellで取得していた。
$ find . -maxdepth 3 -path '*_test.go' -type f | xargs -I{} dirname {} | uniq
Gopherなら、積極的に $ go <action>
を使っていきましょう。
More than 5 years have passed since last update.
go list
という便利コマンドがあるので、利用すると簡単に取得できる。
$ go list -f="{{if .TestGoFiles}}{{.ImportPath}}{{end}}" ./...
以前の自分はShellで取得していた。
$ find . -maxdepth 3 -path '*_test.go' -type f | xargs -I{} dirname {} | uniq
Gopherなら、積極的に $ go <action>
を使っていきましょう。
Register as a new user and use Qiita more conveniently