Documentation
¶
Overview ¶
Package bytescomparestring implements a Go analysis linter that flags string(a) == string(b) and string(a) != string(b) comparisons where both a and b are []byte values, which should use bytes.Equal(a, b) instead to avoid unnecessary allocations.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Analyzer = &analysis.Analyzer{ Name: "bytescomparestring", Doc: "reports string(a) == string(b) and string(a) != string(b) comparisons where a and b are []byte values that should use bytes.Equal instead", URL: "https://github.com/github/gh-aw/tree/main/pkg/linters/bytescomparestring", Requires: []*analysis.Analyzer{inspect.Analyzer}, Run: run, }
Analyzer is the bytes-compare-string analysis pass.
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.