添加utils.IsPtrTimeZero

This commit is contained in:
gazebo
2019-09-29 17:10:54 +08:00
parent 9e46a9195d
commit 6a20301c9e

View File

@@ -335,6 +335,10 @@ func IsTimeZero(timeValue time.Time) bool {
return timeValue == DefaultTimeValue || timeValue == ZeroTimeValue
}
func IsPtrTimeZero(timePtr *time.Time) bool {
return timePtr == nil || *timePtr == DefaultTimeValue || *timePtr == ZeroTimeValue
}
func HTTPBody2Values(data []byte, needDecode bool) (url.Values, error) {
bodyStr := string(data)
if needDecode {