iedc-go/vendor/code.hoteas.com/golang/hotime/common/context_base.go

19 lines
247 B
Go
Raw Normal View History

2023-03-02 19:12:15 +00:00
package common
import (
"time"
)
type ContextBase struct {
tag string
}
//唯一标志
func (that *ContextBase) GetTag() string {
if that.tag == "" {
that.tag = ObjToStr(time.Now().Unix()) + ":" + ObjToStr(Random())
}
return that.tag
}