- add func utils.IsTimeZero

This commit is contained in:
gazebo
2019-02-15 14:29:51 +08:00
parent 87d31889da
commit 61d6840bdb

View File

@@ -283,6 +283,10 @@ func Str2TimeWithDefault(timeStr string, defValue time.Time) time.Time {
return retVal
}
func IsTimeZero(timeValue time.Time) bool {
return timeValue == DefaultTimeValue || timeValue == ZeroTimeValue
}
func HTTPResponse2Json(response *http.Response) (map[string]interface{}, error) {
var jsonResult map[string]interface{}
bodyData, err := ioutil.ReadAll(response.Body)