exported identifier

A name in Go that starts with a capital letter, which makes it visible to code in other packages.

In more detail

Target and Describe are exported; internalNote is not, so only its own package can use it. The same rule applies to struct fields, which matters for encoding/json because it can only see exported fields. There are no public or private keywords.

Example

func Describe(t Target) string  // exported
func internalNote() string       // package only

Related terms

Taught in

References