From 653d4a619cb7b937d81deab4f20d3c8d4baa4898 Mon Sep 17 00:00:00 2001 From: Jakob Unterwurzacher Date: Sun, 7 Feb 2016 14:02:09 +0100 Subject: longnames part II: Rename, Unlink, Rmdir, Mknod, Mkdir + tests --- internal/toggledlog/log.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'internal/toggledlog/log.go') 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...)) } } -- cgit v1.2.3