mirror of
https://github.com/kataras/iris.git
synced 2026-01-07 20:17:05 +00:00
minor
This commit is contained in:
@@ -39,11 +39,12 @@ func (t *SimpleDate) UnmarshalJSON(data []byte) error {
|
||||
}
|
||||
|
||||
data = trimQuotes(data)
|
||||
dataStr := string(data)
|
||||
if len(dataStr) == 0 {
|
||||
return nil // as an excepption here, allow empty "" on simple dates, as the server would render it on a response: https://endomedical.slack.com/archives/D02BF660JA1/p1630486704048100.
|
||||
if len(data) == 0 {
|
||||
return nil // as an excepption here, allow empty "" on simple dates, as the server would render it on a response.
|
||||
}
|
||||
|
||||
dataStr := string(data)
|
||||
|
||||
tt, err := time.Parse(SimpleDateLayout, dataStr)
|
||||
if err != nil {
|
||||
return err
|
||||
|
||||
Reference in New Issue
Block a user