The scope of an identifier denoting a constant, type, variable, or function (but not method) declared at top level (outside any function) is the package block.
The only things that are file-scoped are imports.
Capitalization does not affect scope inside the package, it affects whether the identifier is exported (and thus available from outside the package).
From https://golang.org/ref/spec#Declarations_and_scope:
The only things that are file-scoped are imports.
Capitalization does not affect scope inside the package, it affects whether the identifier is exported (and thus available from outside the package).