(s string)
| 44 | } |
| 45 | |
| 46 | func Sha1(s string) (str string) { |
| 47 | h := sha1.New() |
| 48 | h.Write([]byte(s)) |
| 49 | bs := h.Sum(nil) |
| 50 | return fmt.Sprintf("%x", bs) |
| 51 | } |
| 52 | |
| 53 | func GetNowDateTime() string { |
| 54 | return time.Unix(time.Now().Unix(), 0).Format("2006-01-02 15:04:05") |