./…在Go中是什么意思?
问题描述:
I usually see ./...
in golang
for example go test ./...
or go fmt ./...
only know the meaning of one or two dots
我通常在golang 只知道一个或两个点的含义 p>
div>
中看到。/ ... code>,例如去测试./... code>或
去fmt ./... code> p>
答
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:
答
./...
means a recursive action ( ...
) from your current directory ( ./
)