From d00b8abc5a9a1f5e1a287c04a84d4b135721963d Mon Sep 17 00:00:00 2001 From: Anthony Wang Date: Tue, 29 Mar 2022 07:49:20 -0500 Subject: Return from main function instead of os.exit --- sd.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sd.go b/sd.go index 4470b28..eb9e9fc 100644 --- a/sd.go +++ b/sd.go @@ -22,7 +22,7 @@ func main() { // Seed the RNG rand.Seed(time.Now().UnixNano()) } - + flag.Parse() db, err := sql.Open("sqlite", *file) @@ -84,7 +84,7 @@ func main() { } else if b[0] == byte('n') { w <<= 1 } else { - os.Exit(0) + return } // Update segment tree and database -- cgit v1.2.3-70-g09d2