GITLAB

zhangqijia / Pro2DServer

Sign in
  • Sign in
  • Project
  • Files
  • Commits
  • Network
  • Graphs
  • Issues 0
  • Merge Requests 0
  • Wiki
  • Pro2DServer
  • utils
  • utils.go
  • 765431a4   增加schema接口, 抽象 models + db Browse Code »
    zhangqijia
    2022-03-18 19:35:43 +0800  
utils.go 225 Bytes
Edit Raw Blame History
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
package utils

import (
	"crypto/md5"
	"encoding/hex"
	"time"
)

func Md5V(str string) string  {
	h := md5.New()
	h.Write([]byte(str))
	return hex.EncodeToString(h.Sum(nil))
}

func Timex() int64 {
	return time.Now().Unix()
}