mirror of
https://gitee.com/dromara/carbon.git
synced 2024-11-29 18:57:37 +08:00
优化代码
This commit is contained in:
parent
15b97e2990
commit
02b43020a6
2
tag.go
2
tag.go
@ -114,7 +114,7 @@ func (c Carbon) parseTag() (key, value, tz string) {
|
||||
if carbon == "" {
|
||||
return "layout", defaultLayout, tz
|
||||
}
|
||||
if len(carbon) <= 7 {
|
||||
if !strings.HasPrefix(carbon, "layout:") && !strings.HasPrefix(carbon, "format:") {
|
||||
return "", "", tz
|
||||
}
|
||||
key = strings.TrimSpace(carbon[:6])
|
||||
|
Loading…
Reference in New Issue
Block a user