analyzer

package
v0.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 31, 2026 License: MIT Imports: 9 Imported by: 0

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

func SetConfig

func SetConfig(exclude []string)

SetConfig sets the exclude patterns from config file.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL