Q:

What does go list ./... do?

I am having trouble understanding what the following command does.
go list ./...

When I look at the official documentation https://golang.org/cmd/go/#hdr-List_packages, it is not clear to me what the ./... argument is telling the command.

A:

go list requires an import path for a package and can give you some listing info for the packages matched this way (you may be interested in its -f flag).
./... is a wildcard that matches the current folder and all of its subfolders (execute go help packages to read more about this somewhat hidden feature), and that can be used with all the built-in Go commands.
So go list ./... can list all the Go packages in the current folder and its sub-folders - you may want to call it from GOPATH for example.

