Skip to content

odd-paired-arguments

Detect odd element counts passed to pair-oriented APIs.

Updated View as Markdown

Default severity: error

Some functions consume slice or variadic elements in pairs and reject odd lengths. The check recognizes standard pair-oriented APIs and local functions that enforce an even length by panicking, then checks calls whose argument length is statically known.

Bad

strings.NewReplacer("old", "new", "orphan")

Good

strings.NewReplacer("old", "new")
Navigation

Type to search…

↑↓ navigate↵ selectEsc close