Inspectopedia Help

Unexported return type of the exported function

Reports exported functions with unexported return types.

Unexported types can be difficult to use when viewing documentation under go doc.

Example:

type hidden struct{} func Exported() hidden { // Exported function with the `hidden` unexported return type return hidden{} }
type Hidden struct{} func Exported() Hidden { // Fixed return Hidden{} }

Inspection Details

By default bundled with:

GoLand 2024.1, Qodana for Go 2024.1,

Can be installed with plugin:

Go, 241.SNAPSHOT

Last modified: 12 March 2024