Merge pull request #8 from michaelbeaumont/patch-1

Allow the `Line` formatter to be overridden
master
Kris Nóva 2021-02-25 13:00:27 -08:00 committed by GitHub
commit dc4e3aa5d3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -102,7 +102,7 @@ func LineBytes(prefix, format string, a ...interface{}) []byte {
} }
// Line will format a log line, and return a string // Line will format a log line, and return a string
func Line(prefix, format string, a ...interface{}) string { var Line = func(prefix, format string, a ...interface{}) string {
if !strings.Contains(format, "\n") { if !strings.Contains(format, "\n") {
format = fmt.Sprintf("%s%s", format, "\n") format = fmt.Sprintf("%s%s", format, "\n")
} }