2021-10-24 22:25:40 +08:00
|
|
|
package utils
|
|
|
|
|
|
|
|
import (
|
|
|
|
"fmt"
|
|
|
|
"testing"
|
|
|
|
"time"
|
|
|
|
)
|
|
|
|
|
|
|
|
func TestConvertTime(t *testing.T) {
|
|
|
|
seconds := time.Duration(50) * time.Second
|
|
|
|
fmt.Println(ConvertTime(seconds))
|
|
|
|
|
|
|
|
seconds = time.Duration(150) * time.Second
|
|
|
|
fmt.Println(ConvertTime(seconds))
|
|
|
|
|
|
|
|
seconds = time.Duration(3600) * time.Second
|
|
|
|
fmt.Println(ConvertTime(seconds))
|
|
|
|
|
|
|
|
seconds = time.Duration(1246852) * time.Second
|
|
|
|
fmt.Println(ConvertTime(seconds))
|
|
|
|
}
|
2022-05-24 19:56:06 +08:00
|
|
|
|
|
|
|
func TestUuidStr(t *testing.T) {
|
|
|
|
fmt.Println(UuidStr())
|
|
|
|
}
|
2022-06-01 21:55:03 +08:00
|
|
|
|
|
|
|
func TestMd5Str(t *testing.T) {
|
|
|
|
fmt.Println(Md5Str("123456"))
|
|
|
|
}
|