I am trying to find some information on parenthesis enclosed variable declaration syntax in Go but maybe I just do not know its name and that's why I cannot find it (just like with e.g. value and pointer receivers).
Namely I would like to know the rules behind this type of syntax:
package main
import (
"path"
)
// What's this syntax ? Is it exported ?
var (
rootDir = path.Join(home(), ".coolconfig")
)
func main() {
// whatever
}
Are those variables in var ()
block available in modules that import this one?