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.


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:


Last modified: 12 March 2024