---
title: "unsupported-binary-write"
description: "Detect values encoding/binary cannot serialize."
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.

# unsupported-binary-write

**Default severity:** `error`

Reports architecture-sized integers and other variable-size values passed to
`binary.Write`.

## Bad

```go
binary.Write(writer, binary.LittleEndian, value) // reported when value is int
```

## Good

```go
binary.Write(writer, binary.LittleEndian, uint32(value))
```

Source: https://strider.gempir.com/analyzers/unsupported-binary-write/index.mdx
