Public visibility determines whether a Go identifier can be referenced outside its package: names beginning with a capital letter are exposed. section 2.1.1
Apply the rule consistently when sharing identifiers:
- Use an uppercase initial for functions or variables that another package must access, such as fmt.Println. section 2.1.1
- Expose struct fields required by templates; changing a field from exposed to unexposed prevents the template from printing it. section 11.2.2
Calling an exposed function
package main import "fmt" func main() { fmt.Println("Hello world") } The capitalized Println identifier is accessible through the imported fmt package, producing Hello world when the program runs. section 2.1.1







