精简代码

This commit is contained in:
gouguoyin 2021-07-19 09:55:07 +08:00
parent 82ed3c264c
commit 4c1c004f09

View File

@ -10,8 +10,8 @@ func (c Carbon) Season() string {
if c.IsZero() { if c.IsZero() {
return "" return ""
} }
if len(c.Lang.resources) == 0 && c.Lang.SetLocale(defaultLocale) != nil { if len(c.Lang.resources) == 0 {
return "" c.Lang.SetLocale(defaultLocale)
} }
index := -1 index := -1
switch { switch {