hotime/common/context_base.go
2021-05-25 20:27:24 +08:00

19 lines
247 B
Go

package common
import (
"time"
)
type ContextBase struct {
tag string
}
//唯一标志
func (this *ContextBase) GetTag() string {
if this.tag == "" {
this.tag = ObjToStr(time.Now().Unix()) + ":" + ObjToStr(Random())
}
return this.tag
}