---
title: "waitgroup-go-forbidden-call"
description: "Reject panic, recover, and WaitGroup.Done inside WaitGroup.Go."
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.

# waitgroup-go-forbidden-call

**Default severity:** `error`

`sync.WaitGroup.Go` calls `Done` automatically when its task returns, and its
contract requires the task not to panic. Calling `Done` manually corrupts the
counter; `panic` and `recover` indicate a task that does not satisfy the API
contract.

## Bad

```go
group.Go(func() {
	defer group.Done()
	work()
})
```

## Good

```go
group.Go(func() {
	work()
})
```

Source: https://strider.gempir.com/analyzers/waitgroup-go-forbidden-call/index.mdx
