Last active
December 16, 2015 00:09
-
-
Save kwmt/5345379 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//定義 | |
var debug = debugT(false) | |
type debugT bool | |
func (d debugT) Printf(format string, args ...interface{}) { | |
if d { | |
log.Printf(format, args...) | |
} | |
} | |
//使い方 | |
debug.Printf("this is debug log %v", err) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment