In the Go tutorial, and most of the Go code I’ve looked at, packages are imported like this:
import (
"fmt"
"os"
"launchpad.net/lpad"
...
)
But in http://bazaar.launchpad.net/~niemeyer/lpad/trunk/view/head:/session_test.go, the gocheck package is imported with a . (period):
import (
"http"
. "launchpad.net/gocheck"
"launchpad.net/lpad"
"os"
)
What is the significance of the . (period)?
It allows the identifiers in the imported package to be referred to in the local file block without a qualifier.
Ref: http://golang.org/doc/go_spec.html#Import_declarations