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.

Example:

package myPackage func MyPackageGetIP() { }

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

According to Package Names at github.com/golang, 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

By default bundled with:

GoLand 2024.1, Qodana for Go 2024.1,

Can be installed with plugin:

Go, 241.SNAPSHOT

Last modified: 29 April 2024