liveBook · Manning

Exported identifier

An exported identifier is a Go declaration or member whose name begins with an uppercase letter and is accessible from other packages.

How 2 Manning books explain it

100 Go Mistakes and How to Avoid Them

An exported element is a Go package declaration whose name begins with an uppercase letter and is accessible from other packages.

How it is used
Controls which declarations form a Go package’s public API and which remain available only inside the package.
How deep it goes
Defines capitalization-based visibility and documents API practices, but does not descend into compiler or runtime internals.
Examples
Uses exported Customer and ID declarations, net subdirectories, deprecation comments, and Balance getter and setter methods.
What you can do after
Apply Go visibility and documentation conventions when designing a package API.

Read how 100 Go Mistakes and How to Avoid Them explains exported identifier →

Learn Go with Pocket-Sized Projects

An exported symbol is a Go declaration whose identifier begins with an uppercase letter and is accessible from another package.

How it is used
Defines package APIs that other Go packages can access while keeping implementation details private.
How deep it goes
Explains naming, documentation, compatibility, and concrete declarations, but does not descend into compiler or linker internals.
Examples
Uses a Logger type, a byte-based Level type, and LevelDebug, LevelInfo, and LevelError constants.
What you can do after
Apply Go naming and documentation conventions when designing a package API for external users.

Read how Learn Go with Pocket-Sized Projects explains exported identifier →

Related concepts

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.