Beispiel #1
0
// NewSessionEngin constructor
func NewSessionEngin(lenID uint8, ipProtect bool, stor TStor) *TSession {
	return &TSession{
		ipProtect: ipProtect,
		gen:       genid.NewHTTPGen(lenID),
		Stor:      stor,
	}
}
Beispiel #2
0
func main() {
	gi := genid.NewHTTPGen(184)
	for i := 0; i < 10; i++ {
		id := gi.NewID()
		fmt.Println(id, len(id))
	}
}