What does ./… mean in Go?

Issue

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

only know the meaning of one or two dots

Solution

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

Answered By – Kenny Grant

Answer Checked By – Terry (GoLangFix Volunteer)

Leave a Reply

Your email address will not be published.