Exported PascalCase (ARCH5001)
Key go.naming.exported-pascalcase · Severity warning · Category naming
Exported identifiers (those starting with an uppercase letter) should use PascalCase (MixedCaps) and contain no underscores. Underscore-laden names violate Go naming conventions and make the public API look inconsistent.
Incorrect
Section titled “Incorrect”func Get_User_Name(id int) string { return store.Lookup(id)}Correct
Section titled “Correct”func GetUserName(id int) string { return store.Lookup(id)}Remove underscores and capitalize each word boundary to form PascalCase.