mirror of
https://github.com/odin-lang/Odin.git
synced 2026-04-27 16:53:55 +00:00
Fix trailing space with only .Date log option
This commit is contained in:
@@ -123,7 +123,12 @@ do_time_header :: proc(opts: Options, buf: ^strings.Builder, t: time.Time) {
|
||||
fmt.sbprint(buf, "[")
|
||||
y, m, d := time.date(t)
|
||||
h, min, s := time.clock(t)
|
||||
if .Date in opts { fmt.sbprintf(buf, "%d-%02d-%02d ", y, m, d) }
|
||||
if .Date in opts {
|
||||
fmt.sbprintf(buf, "%d-%02d-%02d", y, m, d)
|
||||
if .Time in opts {
|
||||
fmt.sbprint(buf, " ")
|
||||
}
|
||||
}
|
||||
if .Time in opts { fmt.sbprintf(buf, "%02d:%02d:%02d", h, min, s) }
|
||||
fmt.sbprint(buf, "] ")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user