aboutsummaryrefslogtreecommitdiff
path: root/internal/toggledlog/log.go
diff options
context:
space:
mode:
authorJakob Unterwurzacher2016-02-07 14:02:09 +0100
committerJakob Unterwurzacher2016-02-07 14:02:09 +0100
commit653d4a619cb7b937d81deab4f20d3c8d4baa4898 (patch)
tree4ae1132e0a082d72fa5f008f91e451ce138ec273 /internal/toggledlog/log.go
parent2a11906963d4e9be8876757690eee53c737dcef9 (diff)
longnames part II: Rename, Unlink, Rmdir, Mknod, Mkdir + testsv0.9-rc1
Diffstat (limited to 'internal/toggledlog/log.go')
-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...))
}
}