func (t *Token) UnmarshalText(data []byte) error {
	number := uint64(0)
	idx := 0.0
	chars := []byte(Base62)
	charsLength := float64(len(chars))
	tokenLength := float64(len(data))
	if tokenLength > MaxTokenLength {
		return ErrTokenTooBig
	} else if tokenLength < MinTokenLength {
		return ErrTokenTooSmall
	}
	for _, c := range data {
		power := tokenLength - (idx + 1)
		index := bytes.IndexByte(chars, c)
		if index < 0 {
			return ErrInvalidCharacter
		}
		number += uint64(index) * uint64(math.Pow(charsLength, power))
		idx++
	}
	*t = Token(number)
	return nil
}
UnmarshalText implements the `encoding.TextUnmarshaler` interface
package token
import (
	"bytes"
	"math"
	"math/rand"
	"time"
)
const (
	Base62 = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
	MaxTokenLength = 10
	MinTokenLength = 1
	DefaultTokenLength = 9
)
var (
	base62Len = uint64(len(Base62))
)
func init() {
	rand.Seed(time.Now().UTC().UnixNano())
}
type Token uint64
func (t Token) Encode() string {
	bs, _ := t.MarshalText()
	return string(bs)
}