commit bce4b16
chld
·
2026-02-06 04:14:56 +0000 UTC
parent 7b774dd
add exit flag in die
1 files changed,
+3,
-1
+3,
-1
1@@ -2,6 +2,7 @@ package dgr
2
3 import (
4 "fmt"
5+ "os"
6 )
7
8 func Msg(a string) {
9@@ -14,9 +15,10 @@ func Info(a string) {
10 fmt.Printf("%s\n", a)
11 }
12
13-func Die(a string) {
14+func Die(a string, exit int) {
15 fmt.Printf("\033[m\033[31;1mERROR:\033[m ")
16 fmt.Printf("%s\n", a)
17+ os.Exit(exit)
18 }
19
20 func Warn(a string) {