تخطَّ إلى المحتوى

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.

func Get_User_Name(id int) string {
return store.Lookup(id)
}
func GetUserName(id int) string {
return store.Lookup(id)
}

Remove underscores and capitalize each word boundary to form PascalCase.