# M0005 imported and not used (/docs/diagnostics/codes/m0005)

<Diagnostic code="M0005" />

## The mistake and the fix [#the-mistake-and-the-fix]

<div className="code-pair">

```go title="The mistake"
import "os" // nothing uses os
```

```go title="Fixed"
// remove the import, or for side effects only: // [!code highlight]
import _ "net/http/pprof" // [!code highlight]
```

</div>

## The fix [#the-fix]

Remove the import, or use _ as its name if it is imported only for its init side effects.

See also [all error codes](/docs/diagnostics/codes) and [marmot explain](/docs/commands/explain).