I usually see ./...
in golang
for example go test ./...
or go fmt ./...
only know the meaning of one or two dots
Go uses pointers like C or C++. The * symbol is used to declare a pointer and to dereference. The & symbol points to the address of the stored value.
The := syntax is shorthand for declaring and initializing a variable, example f := "car" is the short form of var f string = "car" The short variable declaration operator( := ) can only be used for declaring local variables.
In Go a pointer is represented using the * (asterisk) character followed by the type of the stored value. In the zero function xPtr is a pointer to an int . * is also used to “dereference” pointer variables. Dereferencing a pointer gives us access to the value the pointer points to.
According to Language Specification, http://golang.org/ref/spec#IncDec_statements, i++ is a IncDec statements , which is a statement , but not a expression . As for args[index] , index must be a expression .
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
./...
means a recursive action ( ...
) from your current directory ( ./
)
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