aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnthony Wang2022-03-29 07:49:20 -0500
committerAnthony Wang2022-03-29 07:49:20 -0500
commitd00b8abc5a9a1f5e1a287c04a84d4b135721963d (patch)
treeecf4c262ef988034b84affbb1da627f0b765a674
parenta6f1a57e0aacd46a0d6184dad6eaf9ee4ed4f342 (diff)
Return from main function instead of os.exit
-rw-r--r--sd.go4
1 files 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