Keyword

Go import keyword

Makes another package available to a source file. The import name defaults to the imported package’s declared name; an alias can change it. Ordinary imports must be used; a blank import is for initialization side effects. Example uses fmt.

Formal Syntax & Structure

go syntaxgo
import [localName] "package/path" | import ( importSpecs )

Working Example

Example Snippetgo
package main
import "fmt"
func main() {  fmt.Println("ready")}
Go Reference