Documentation
¶
Overview ¶
Package analyzer provides a linter that suggests using value types instead of pointers when the struct is small enough and doesn't require pointer semantics.
Index ¶
Constants ¶
View Source
const DefaultThreshold = 1024
DefaultThreshold is the default size threshold in bytes. Structs smaller than or equal to this are candidates for value types.
Variables ¶
View Source
var Analyzer = &analysis.Analyzer{ Name: "pointless", Doc: "suggests using value types instead of pointers for small structs", Run: run, Requires: []*analysis.Analyzer{inspect.Analyzer}, }
Analyzer is the pointless analyzer.
Functions ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.