go vet claims we need a buffered chan for signal
Ted Unangst tedu@tedunangst.com
Sun, 02 Jul 2023 14:08:26 -0400
M
util.go
→
util.go
@@ -90,7 +90,7 @@ defer func() {
os.Remove(dbname) os.Exit(1) }() - c := make(chan os.Signal) + c := make(chan os.Signal, 1) signal.Notify(c, os.Interrupt) go func() { <-c@@ -209,7 +209,7 @@ db := opendatabase()
defer func() { os.Exit(1) }() - c := make(chan os.Signal) + c := make(chan os.Signal, 1) signal.Notify(c, os.Interrupt) go func() { <-c@@ -263,7 +263,7 @@ }
defer func() { os.Exit(1) }() - c := make(chan os.Signal) + c := make(chan os.Signal, 1) signal.Notify(c, os.Interrupt) go func() { <-c