Skip to content
Myr

Correct logic where we add a space after the prefix when logging

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Christian Rocha · committed by Christian Rocha · parent fbd32c6 · Browse files · 1 file+1 added−1 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+1 added−1 removed

  • other:+1 added−1 removed

1 file+1 added−1 removed

modified:logging.go+1 added-1 removed
27 unmodified lines
28 // Add a space after the prefix if a prefix is being specified and it29 // doesn't already have a trailing space.30 if len(prefix) > 0 {31 finalChar := prefix[len(prefix)-1]32 if unicode.IsSpace(rune(finalChar)) {32 if !unicode.IsSpace(rune(finalChar)) {33 prefix += " "34 }35 }36 log.SetPrefix(prefix)
3 unmodified lines