Skip to content

Instantly share code, notes, and snippets.

View dimus's full-sized avatar

Dmitry Mozzherin dimus

  • University of Illinois
  • Champaign, IL, US
View GitHub Profile
@dimus
dimus / main.go
Created March 13, 2022 11:49 — forked from pteich/main.go
Example for using go's sync.errgroup together with signal detection signal.Notify to stop all running goroutines
package main
import (
"context"
"errors"
"fmt"
"os"
"os/signal"
"syscall"
"time"