What do three dots "./..." mean in Go command line invocations?

Go

Go Problem Overview


If you run Golang tests on Travis CI, it will download all of your dependencies with three dots:

go get -d -v ./... && go build -v ./...

What does ./... indicate or expand to there? I've done some research but it doesn't seem to be a Unix convention.

Go Solutions


Solution 1 - Go

From the command go help packages:

> An import path is a pattern if it includes one or more "..." wildcards, each of which can match any string, including the empty string and strings containing slashes. Such a pattern expands to all package directories found in the GOPATH trees with names matching the patterns. As a special case, x/... matches x as well as x's subdirectories. For example, net/... expands to net and packages in its subdirectories.

Solution 2 - Go

go [command] ./...

Here ./ tells to start from the current folder, ... tells to go down recursively.

For Example:

go list ...

In any folder lists all the packages, including packages of the standard library first followed by external libraries in your go workspace.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionKevin BurkeView Question on Stackoverflow
Solution 1 - GoKevin BurkeView Answer on Stackoverflow
Solution 2 - GoEmdadul SawonView Answer on Stackoverflow