From a0f96abea48282aef566052f14a49188d1be1fd7 Mon Sep 17 00:00:00 2001 From: camcui <166618273+camcui@users.noreply.github.com> Date: Fri, 26 Apr 2024 23:40:18 +0800 Subject: [PATCH] Replace custom strings with constants from the standard library (#537) --- log/command.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/log/command.go b/log/command.go index 32a3498..7ea959e 100644 --- a/log/command.go +++ b/log/command.go @@ -46,9 +46,9 @@ func (o Options) Run() error { "stampmilli": time.StampMilli, "stampmicro": time.StampMicro, "stampnano": time.StampNano, - "datetime": "2006-01-02 15:04:05", - "dateonly": "2006-01-02", - "timeonly": "15:04:05", + "datetime": time.DateTime, + "dateonly": time.DateOnly, + "timeonly": time.TimeOnly, } tf, ok := timeFormats[strings.ToLower(o.Time)]