---
title: "enforce-switch-style"
description: "Require default clauses to be last."
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.

# enforce-switch-style

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

**Default severity:** `warning`

Require default clauses to be last. Default: default optional.

## Bad

```go
switch value { default: fallback(); case 1: one() }
```

## Good

```go
switch value { case 1: one(); default: fallback() }
```

Source: https://strider.gempir.com/lints/enforce-switch-style/index.mdx
