Skip to content

Instantly share code, notes, and snippets.

@faabiosr
faabiosr / main.go
Created March 25, 2024 21:50 — forked from pteich/main.go
Example for using go's sync.errgroup together with signal detection signal.NotifyContext to stop all running goroutines
package main
import (
"context"
"errors"
"fmt"
"os/signal"
"syscall"
"time"