...

/

Exported names

Exported names

This lesson discusses how to refer to exported names and how to use them after importing their package

How to Export

After importing a package, you can refer to the names it exports (meaning variables, methods, ​and functions that are available from outside of the package). In Go, a name is exported if it begins with a capital letter. Foo is an exported name, as is FOO. The name foo is not exported.

See the difference between:

Access this course and 1400+ top-rated courses and projects.