I wanted to install gb
The installation steps says to execute the command:
go get github.com/constabulary/gb/...
What does the ...
mean in this case?
You would use -u to update the dependencies to their latest available minor and patch versions. So if your module is using package foo.com/bar , running go get -u foo.com/bar will update not only foo.com/bar to the latest MINOR.
GO111MODULE is an environment variable that can be set when using go for changing how Go imports packages. One of the first pain-points is that depending on the Go version, its semantics change.
Since 1.12 version Go modules is enabled by default and the GOPATH will be deprecated in 1.13 version. For those who are getting started with Go 1.12, the installation and set up goes will be as follows.
The go mod vendor command constructs a directory named vendor in the main module's root directory that contains copies of all packages needed to support builds and tests of packages in the main module. Packages that are only imported by tests of packages outside the main module are not included.
The ...
(ellipsis) tells go get
to also fetch the package's subpackages/dependencies.
From 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.
For an example of how you'd use it, check out this answer.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With