1package main 2 3import ( 4 "io" 5 "log" 6 "os" 7) 8 9func setupLogging(debug bool) { 10 if debug { 11 debugLog = log.New(os.Stdout, "DEBUG: ", log.Ltime|log.Lmicroseconds) 12 } else { 13 debugLog = log.New(io.Discard, "", 0) 14 } 15}