forked from golang/hotime
20 lines
254 B
Go
20 lines
254 B
Go
package common
|
|
|
|
import (
|
|
"time"
|
|
)
|
|
|
|
type ContextBase struct {
|
|
Error
|
|
tag string
|
|
}
|
|
|
|
//唯一标志
|
|
func (this *ContextBase) GetTag() string {
|
|
|
|
if this.tag == "" {
|
|
this.tag = ObjToStr(time.Now().Unix()) + ":" + ObjToStr(Random())
|
|
}
|
|
return this.tag
|
|
}
|