forked from Mirrors/bubbletea
Correct logic where we add a space after the prefix when logging
This commit is contained in:
parent
fbd32c6eee
commit
cd676fab5a
|
@ -29,7 +29,7 @@ func LogToFile(path string, prefix string) (*os.File, error) {
|
|||
// doesn't already have a trailing space.
|
||||
if len(prefix) > 0 {
|
||||
finalChar := prefix[len(prefix)-1]
|
||||
if unicode.IsSpace(rune(finalChar)) {
|
||||
if !unicode.IsSpace(rune(finalChar)) {
|
||||
prefix += " "
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue