mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-06 23:58:50 +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, "[")
|
fmt.sbprint(buf, "[")
|
||||||
y, m, d := time.date(t)
|
y, m, d := time.date(t)
|
||||||
h, min, s := time.clock(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) }
|
if .Time in opts { fmt.sbprintf(buf, "%02d:%02d:%02d", h, min, s) }
|
||||||
fmt.sbprint(buf, "] ")
|
fmt.sbprint(buf, "] ")
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user