diff options
Diffstat (limited to 'util.go')
-rw-r--r-- | util.go | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -1,10 +1,18 @@ package main import ( + "fmt" "net/url" "os" ) +func logDebug(format string, v ...interface{}) { + // Unless the debug flag is specified, discard logs. + if *flagDebug { + fmt.Printf(format+"\n", v) + } +} + func assert(cond bool, msg string) { if !cond { panic(msg) |