From 56ad3147e1342a5f24c1e5ff4b5984d74774e2ad Mon Sep 17 00:00:00 2001 From: "M. J. Fromberger" Date: Wed, 11 Sep 2024 19:04:41 -0700 Subject: [PATCH] README.md: add a table of contents --- README.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/README.md b/README.md index 3feb6c9..ff3719b 100644 --- a/README.md +++ b/README.md @@ -12,6 +12,15 @@ for common concurrent tasks. Here is a [working example in the Go Playground](https://go.dev/play/p/wCZzMDXRUuM). +## Contents + +- [Rationale](#rationale) +- [Overview](#overview) +- [Filtering Errors](#filtering-errors) +- [Controlling Concurrency](#controlling-concurrency) +- [Solo Tasks](#solo-tasks) +- [Collecting Results](#collecting-results) + ## Rationale Go provides powerful concurrency primitives, including @@ -172,6 +181,8 @@ A group does not directly support cancellation, but integrates cleanly with the standard [context](https://godoc.org/context) package. A `context.CancelFunc` can be used as a trigger to signal the whole group when an error occurs. +## Overview + A task is expressed as a `func() error`, and is added to a group using the `Go` method: