Browse Source

注释掉无用函数

pull/2/head
zhangxin 3 years ago
parent
commit
27580abdd7
1 changed files with 0 additions and 25 deletions
  1. +0
    -25
      utils/value.go

+ 0
- 25
utils/value.go View File

@ -3,7 +3,6 @@ package utils
import ( import (
"reflect" "reflect"
"strconv" "strconv"
"time"
) )
func ValueType(in interface{}) string { func ValueType(in interface{}) string {
@ -205,30 +204,6 @@ func ValueToStringIn(in interface{}, def string, fixed int) string {
return def 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 { func ValueIsEmpty(in interface{}) bool {
if in == nil { if in == nil {
return true return true


Loading…
Cancel
Save