← BYTES
Go·Starter·Ref: 10.1.9
What does an import statement like `import "fmt"` do?
Have a question about this video? Mention reference 10.1.9 when you contact us.
a.It downloads the fmt package from the internet every time the program runs
b.It makes the exported identifiers of the fmt package (like fmt.Println) available for use in the current file
c.It copies the entire source code of fmt directly into your file at compile time
d.It is optional and only affects IDE autocomplete, not actual compilation
An import statement brings a package's exported names into scope so the current file can reference them (qualified by the package name, e.g. fmt.Println) -- the package itself is compiled once, separately, and linked in; nothing is downloaded at run time, and omitting a needed import is a compile error, not just a style issue.
Find this on YouTube & Instagram
Every BYTES video is tagged with its reference number and topic — search any of these on YouTube or Instagram to find this one:
#BYTES#BYTES1019#Go