summaryrefslogtreecommitdiff
path: root/log.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2024-11-07 01:23:43 -0600
committerJeff Carr <[email protected]>2024-11-07 01:23:43 -0600
commitef61eb494b42a7bc226de1edc114579ce530abdd (patch)
tree0bd23b52a8aae23806d8cdc9896936c39cd07728 /log.go
parent2b11a4e334f465aef868d6c1bf3f1a7c9dfd5c27 (diff)
try allowing switching to writing to httpv0.22.2
Diffstat (limited to 'log.go')
-rw-r--r--log.go10
1 files changed, 7 insertions, 3 deletions
diff --git a/log.go b/log.go
index 5b436b6..deb15a0 100644
--- a/log.go
+++ b/log.go
@@ -22,19 +22,23 @@ In your package, register NETWARN:
*/
func Log(f *LogFlag, a ...any) {
- if ! f.Ok() {
+ if !f.Ok() {
// if the flag is NULL, notify the user they didn't initialize the flag
a = append([]any{"FLAG = NULL"}, a...)
realPrintln(a...)
return
}
- if ! f.Get() { return }
+ if !f.Get() {
+ return
+ }
a = append([]any{f.short}, a...)
realPrintln(a...)
}
func Logf(f *LogFlag, s string, a ...any) {
- if ! f.Get() { return }
+ if !f.Get() {
+ return
+ }
s = f.short + " " + s
realPrintf(s, a...)
}