Inspectopedia Help

Name starts with a package name

Reports exported names that start with a package name. This inspection does not report such names in the main package.


package myPackage func MyPackageGetIP() { }

The MyPackageGetIP name will be highlighted as it starts with the package name.

According to Package Names at, all references to names in a package will be done using the package name, so one can omit that name from the identifiers. For example, if you are in a package foo, you do not need a type FooFile, which clients will write as foo.FooFile. Instead, we name the type File, which clients will write as foo.File.

Inspection Details

Available in:

GoLand 2023.3



Last modified: 13 July 2023