uuid.go 233 字节
Newer Older
E
eoLinker API Management 已提交
1 2 3
package utils

import (
Y
Your Name 已提交
4 5
	"log"
	"os/exec"
E
eoLinker API Management 已提交
6 7
	"strings"
)
Y
Your Name 已提交
8

Y
Your Name 已提交
9
//TimeUUID uuid
E
eoLinker API Management 已提交
10
func TimeUUID() string {
Y
Your Name 已提交
11 12 13 14 15 16
	out, err := exec.Command("uuidgen").Output()
	if err != nil {
		log.Fatal(err)
	}
	return strings.Replace(string(out), "\n", "", -1)
}