./…在Go中是什么意思?

./…在Go中是什么意思?

问题描述:

I usually see ./... in golang
for example go test ./...or go fmt ./...

only know the meaning of one or two dots

我通常在golang
中看到。/ ... code>,例如去测试./... code>或去fmt ./... code> p>

只知道一个或两个点的含义 p> div>

It means perform the action on all packages under a directory. So for example go test ./... runs go test on the current dir + all subdirectories.

The Go tool documentation is here:

https://golang.org/doc/cmd

./... means a recursive action ( ... ) from your current directory ( ./ )