diff options
author | Runxi Yu <me@runxiyu.org> | 2024-12-13 08:13:30 +0800 |
---|---|---|
committer | Runxi Yu <me@runxiyu.org> | 2024-12-13 08:13:30 +0800 |
commit | 06a8e2b2b11ec2b86f0d9f37940707265b62d017 (patch) | |
tree | e6cd51598d57233788bd7e76160b33b81ebeaffb /meselog/meselog.go | |
parent | Use meselog instead of slog (diff) | |
download | meseircd-06a8e2b2b11ec2b86f0d9f37940707265b62d017.tar.gz meseircd-06a8e2b2b11ec2b86f0d9f37940707265b62d017.tar.zst meseircd-06a8e2b2b11ec2b86f0d9f37940707265b62d017.zip |
Reformat
Diffstat (limited to 'meselog/meselog.go')
-rw-r--r-- | meselog/meselog.go | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/meselog/meselog.go b/meselog/meselog.go index d9c84f5..402d674 100644 --- a/meselog/meselog.go +++ b/meselog/meselog.go @@ -5,11 +5,11 @@ import ( ) func log(str string, keyvals []any) { - fmt.Print(str+" ") + fmt.Print(str + " ") for i, j := range keyvals { - if i & 1 == 0 { + if i&1 == 0 { fmt.Printf("%v=", j) - } else if i == len(keyvals) - 1 { + } else if i == len(keyvals)-1 { fmt.Printf("%#v", j) } else { fmt.Printf("%#v ", j) @@ -21,6 +21,7 @@ func log(str string, keyvals []any) { func Error(str string, keyvals ...any) { log("ERROR "+str, keyvals) } + func Debug(str string, keyvals ...any) { log("DEBUG "+str, keyvals) } |