aboutsummaryrefslogtreecommitdiff
path: root/internal/toggledlog
diff options
context:
space:
mode:
Diffstat (limited to 'internal/toggledlog')
-rw-r--r--internal/toggledlog/log.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/internal/toggledlog/log.go b/internal/toggledlog/log.go
index 5e5191a..31a9eb6 100644
--- a/internal/toggledlog/log.go
+++ b/internal/toggledlog/log.go
@@ -9,6 +9,7 @@ import (
const (
ProgramName = "gocryptfs"
+ wpanicMsg = "-wpanic turns this warning into a panic: "
)
func JSONDump(obj interface{}) string {
@@ -35,7 +36,7 @@ func (l *toggledLogger) Printf(format string, v ...interface{}) {
}
l.Logger.Printf(format, v...)
if l.Wpanic {
- panic("-wpanic turns warning into panic: " + fmt.Sprintf(format, v...))
+ panic(wpanicMsg + fmt.Sprintf(format, v...))
}
}
func (l *toggledLogger) Println(v ...interface{}) {
@@ -44,7 +45,7 @@ func (l *toggledLogger) Println(v ...interface{}) {
}
l.Logger.Println(v...)
if l.Wpanic {
- panic("-wpanic turns warning into panic: " + fmt.Sprintln(v...))
+ panic(wpanicMsg + fmt.Sprintln(v...))
}
}