October 2015
Beginner to intermediate
400 pages
14h 44m
English
A Go source file may contain zero or more import declarations
immediately after the package declaration and before the first
non-import declaration. Each import declaration may specify the
import path of a single package, or multiple packages in a
parenthesized list.
The two forms below are equivalent but the second form is more common.
import "fmt"
import "os"
import (
"fmt"
"os"
)
Imported packages may be grouped by introducing blank lines; such
groupings usually indicate different domains. The order is not
significant, but by convention the lines of each group are sorted
alphabetically. (Both gofmt and goimports will group and sort for you.)
import ( "fmt" "html/template" "os" "golang.org/x/net/html" "golang.org/x/net/ipv4" ...