# M0008 wrong number of return values (/docs/diagnostics/codes/m0008)

<Diagnostic code="M0008" />

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

<div className="code-pair">

```go title="The mistake"
func main() {
	return 1
}
```

```go title="Fixed"
func f() int { // [!code highlight]
	return 1
}
```

</div>

## The fix [#the-fix]

Return exactly the values in the signature, or change the signature.

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