From 603ef6227aca5d635ff5c24e688b39f17d63a3d3 Mon Sep 17 00:00:00 2001 From: Runxi Yu Date: Sun, 29 Dec 2024 19:31:39 +0000 Subject: clog: Add fatal --- clog/clog.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/clog/clog.go b/clog/clog.go index b876574..d9162b0 100644 --- a/clog/clog.go +++ b/clog/clog.go @@ -30,3 +30,8 @@ func Debug(str string, keyvals ...any) { func Info(str string, keyvals ...any) { log("INFO "+str, keyvals) } + +func Fatal(exit int, str string, keyvals ...any) { + log("FATAL "+str, keyvals) + os.Exit(exit) +} -- cgit v1.2.3