---
title: "inefficient-sprintf"
description: "Detect fmt.Sprintf calls used only for simple conversions."
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.

# inefficient-sprintf

**Default severity:** `warning`

Simple `%s`, `%t`, and base-10 integer conversions can use the string directly
or the corresponding `strconv` function without format parsing and reflection.

## Bad

```go
text := fmt.Sprintf("%d", number)
```

## Good

```go
text := strconv.Itoa(number)
```

Source: https://strider.gempir.com/analyzers/inefficient-sprintf/index.mdx
