mirror of
https://github.com/charmbracelet/gum
synced 2024-06-15 20:15:08 +02:00
Replace custom strings with constants from the standard library
Signed-off-by: camcui <cuishua@sina.cn>
This commit is contained in:
parent
1a0111eaff
commit
3d0d180544
|
@ -46,9 +46,9 @@ func (o Options) Run() error {
|
||||||
"stampmilli": time.StampMilli,
|
"stampmilli": time.StampMilli,
|
||||||
"stampmicro": time.StampMicro,
|
"stampmicro": time.StampMicro,
|
||||||
"stampnano": time.StampNano,
|
"stampnano": time.StampNano,
|
||||||
"datetime": "2006-01-02 15:04:05",
|
"datetime": time.DateTime,
|
||||||
"dateonly": "2006-01-02",
|
"dateonly": time.DateOnly,
|
||||||
"timeonly": "15:04:05",
|
"timeonly": time.TimeOnly,
|
||||||
}
|
}
|
||||||
|
|
||||||
tf, ok := timeFormats[strings.ToLower(o.Time)]
|
tf, ok := timeFormats[strings.ToLower(o.Time)]
|
||||||
|
|
Loading…
Reference in a new issue