SetDebug sets output into debug mode if true passed
(val bool)
| 42 | |
| 43 | // SetDebug sets output into debug mode if true passed |
| 44 | func SetDebug(val bool) { |
| 45 | if val { |
| 46 | atomic.StoreUint32(&debug, 1) |
| 47 | } else { |
| 48 | atomic.StoreUint32(&debug, 0) |
| 49 | } |
| 50 | } |
| 51 | |
| 52 | // Debugf prints debug message according to a format |
| 53 | func Debugf(format string, args ...interface{}) { |