---
title: "identical-switch-branches"
description: "Detect repeated switch branches."
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.

# identical-switch-branches

<!-- Code generated by docs/scripts/generate-check-docs.go; DO NOT EDIT. -->

**Default severity:** `warning`

Detect repeated switch branches.

## Bad

```go
switch value { case 1: run(); case 2: run() }
```

## Good

```go
switch value { case 1: one(); case 2: two() }
```

Source: https://strider.gempir.com/lints/identical-switch-branches/index.mdx
