---
title: "odd-paired-arguments"
description: "Detect odd element counts passed to pair-oriented APIs."
image: "https://strider.gempir.com/og.png"
---

> Documentation Index
> Fetch the complete documentation index at: https://strider.gempir.com/llms.txt
> Use this file to discover all available pages before exploring further.

# odd-paired-arguments

**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

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

## Good

```go
strings.NewReplacer("old", "new")
```

Source: https://strider.gempir.com/analyzers/odd-paired-arguments/index.mdx
