utils.go 217 Bytes
Newer Older
chenweijian's avatar
chenweijian committed
1 2 3 4 5 6 7 8 9 10 11 12
package route

import (
	uuid "github.com/satori/go.uuid"
	"strings"
)

func genTraceId() string {
	traceId := strings.Replace(uuid.NewV4().String(), "-", "", -1)
	traceId = traceId[:len(traceId)/2]
	return traceId
}