- add func utils.IsTimeZero
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user