# M0024 name not exported (/docs/diagnostics/codes/m0024)

<Diagnostic code="M0024" />

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

<div className="code-pair">

```go title="The mistake"
i := strings.indexFunc(s, unicode.IsSpace)
```

```go title="Fixed"
i := strings.IndexFunc(s, unicode.IsSpace) // [!code highlight]
```

</div>

## The fix [#the-fix]

Use the exported name (upper case first letter).

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