---
title: "max-public-structs"
description: "Limit exported structs per file."
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.

# max-public-structs

**Default severity:** `note`

Limit exported structs per file.

## Bad

```go
type Request struct{}
type Response struct{}
type Client struct{}
type Server struct{}
type Options struct{}
type Result struct{}
```

## Good

```go
type Request struct{}
type Response struct{}
```

## Configuration

| Option | Type | Default | Description |
| --- | --- | --- | --- |
| `max-public-structs` | `int` | `5` | Maximum number of exported struct declarations allowed per file. |

```toml
[checks.max-public-structs]
max-public-structs = 5
```

Source: https://strider.gempir.com/lints/max-public-structs/index.mdx
