From 27580abdd77a27ed382f46e2be2eab9f7363638e Mon Sep 17 00:00:00 2001 From: zhangxin Date: Mon, 5 Jul 2021 13:46:56 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B3=A8=E9=87=8A=E6=8E=89=E6=97=A0=E7=94=A8?= =?UTF-8?q?=E5=87=BD=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- utils/value.go | 25 ------------------------- 1 file changed, 25 deletions(-) diff --git a/utils/value.go b/utils/value.go index 0734cdb..a7872ba 100644 --- a/utils/value.go +++ b/utils/value.go @@ -3,7 +3,6 @@ package utils import ( "reflect" "strconv" - "time" ) func ValueType(in interface{}) string { @@ -205,30 +204,6 @@ func ValueToStringIn(in interface{}, def string, fixed int) string { return def } -func ValueToTime(in interface{}, timeFormat string, def string) string { - if in == nil { - return def - } - switch in.(type) { - case time.Time: - return TimeFormat(in.(time.Time), timeFormat) - case *time.Time: - return TimeFormat(*(in.(*time.Time)), timeFormat) - case []byte: - return string(in.([]byte)) - case string: - return in.(string) - case *[]byte: - return string(*(in.(*[]byte))) - case *string: - return *(in.(*string)) - default: - res := ValueToInt(in, 0) - return TimeFormat(time.Unix(int64(res), 0), timeFormat) - } - return def -} - func ValueIsEmpty(in interface{}) bool { if in == nil { return true