---
title: "spinning-select-default"
description: "Detect select loops that spin on an empty default."
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.

# spinning-select-default

**Default severity:** `warning`

An empty `default` makes a `select` immediately ready. Inside an unconditional
loop, this prevents the goroutine from blocking and consumes CPU continuously.
Remove the empty default so the select can wait for a communication case.

## Bad

```go
for { select { case value := <-values: use(value); default: } }
```

## Good

```go
for { select { case value := <-values: use(value) } }
```

Source: https://strider.gempir.com/lints/spinning-select-default/index.mdx
