ui/token.go
func (t *SimpleToken) Make() (string, error) {
	b := make([]byte, 32)
	_, err := rand.Read(b)
	if err != nil {
		return "", err
	}
	t.mtx.Lock()
	defer t.mtx.Unlock()
	t.token = string(data.FromBytes(b))
	return t.token, nil
}
func (t *SimpleToken) Make() (string, error) {
	b := make([]byte, 32)
	_, err := rand.Read(b)
	if err != nil {
		return "", err
	}
	t.mtx.Lock()
	defer t.mtx.Unlock()
	t.token = string(data.FromBytes(b))
	return t.token, nil
}
func ( t * SimpleToken ) Make ( ) ( string , error ) { b := make ( [ ] byte , 32 ) _ , err := rand . Read ( b ) if err != nil { return " " , err } t . mtx . Lock ( ) defer t . mtx . Unlock ( ) t . token = string ( data . FromBytes ( b ) ) return t . token , nil }
// Make makes new random token.
Make makes new random token .