Documentation
¶
Overview ¶
Package scope defines the two pseudo visibility levels that declscope layers on top of Go's exported/unexported distinction.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Scope ¶
type Scope int
Scope is a pseudo visibility level.
Go only distinguishes exported from unexported, which means every unexported package-level identifier is visible to the whole package. Scope narrows that to a namespace, the way an unmodified item is narrow to its module in Rust. The name of a declaration never decides its scope: a directive states it, and the configured default applies otherwise.
There is no public level. Everything is checked within a single package, so a use beyond the package edge is never seen, and a scope that says "visible outside" would name a distinction the analysis cannot make. What is reachable from outside the package is simply not declscope's subject.