- refactor.
This commit is contained in:
@@ -6,6 +6,10 @@ import (
|
||||
"fmt"
|
||||
"reflect"
|
||||
"strconv"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/satori/go.uuid"
|
||||
)
|
||||
|
||||
func GetConcretValue(value reflect.Value) reflect.Value {
|
||||
@@ -120,3 +124,20 @@ func Int64ToStr(value int64) string {
|
||||
func Int2Str(value int) string {
|
||||
return strconv.Itoa(value)
|
||||
}
|
||||
|
||||
// 去除-号,全部大写,比如:929ADB626EB911E893E452540009DAB3
|
||||
func GetUUID() string {
|
||||
return strings.ToUpper(strings.Replace(uuid.Must(uuid.NewV1()).String(), "-", "", -1))
|
||||
}
|
||||
|
||||
func GetCurTimeStr() string {
|
||||
return time.Now().Format("2006-01-02 15:04:05")
|
||||
}
|
||||
|
||||
func GetCurTimestamp() int64 {
|
||||
return time.Now().Unix()
|
||||
}
|
||||
|
||||
func GetAPIOperator() string {
|
||||
return time.Now().Format("2006-01-02_15:04:05")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user