slicemakezerolength

package
v0.89.7 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package slicemakezerolength implements a Go analysis linter that flags make([]T, 0) calls without a capacity argument when the final slice length can be statically determined, suggesting the capacity should be specified to avoid allocation overhead.

Index

Constants

This section is empty.

Variables

View Source
var Analyzer = analyzerutil.New("slicemakezerolength", "reports make([]T, 0) calls without capacity when the final length is known, which can be optimized", run)

Analyzer is the slice-make-zero-length analysis pass.

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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