Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add debug/release builds tags, improve README
- Loading branch information
Nicolas Chatelain
committed
Feb 15, 2019
1 parent
75b77f4
commit 51aabc1
Showing
8 changed files
with
72 additions
and
20 deletions.
There are no files selected for viewing
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
// +build debug | ||
|
||
package logging | ||
|
||
import "log" | ||
|
||
func Debug(fmt string, args ...interface{}) { | ||
log.Printf(fmt, args...) | ||
} | ||
|
||
func Printf(fmt string, args ...interface{}) { | ||
log.Printf(fmt, args...) | ||
} | ||
|
||
func Fatal(args ...interface{}) { | ||
log.Fatal(args...) | ||
} | ||
|
||
func Fatalf(fmt string, args ...interface{}) { | ||
log.Fatalf(fmt, args...) | ||
} | ||
|
||
func Println(v ...interface{}){ | ||
log.Println(v...) | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
// +build !debug | ||
|
||
|
||
package logging | ||
|
||
func Debug(fmt string, args ...interface{}) { } | ||
func Printf(fmt string, args ...interface{}) { } | ||
func Fatal(fmt string, args ...interface{}) { } | ||
func Println(v ...interface{}) { } | ||
func Fatalf(fmt string, args ...interface{}) {} |
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
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
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