In Go, the first letter of an identifier (function, variable, struct field, etc.) determines its visibility outside the package:

  1. Uppercase first letter: The identifier is exported and accessible from other packages
  2. Lowercase first letter: The identifier is non-exported and only accessible within its package

Always follow these rules:

This convention is a critical part of Go’s visibility system and module design - it’s not just a style preference but affects how your code can be used by others.