README ¶ shortener shortener 就是一个简单的base62的converter 如何使用shortener // 把数字转换为字符串 s := shortener.Encode(1) // 把字符串转换为数字 n := shortener.Deocde(s) Expand ▾ Collapse ▴ Documentation ¶ Index ¶ type Shortener func NewShortener(alphabet string) *Shortener func (shorten *Shortener) Decode(s string) int64 func (shorten *Shortener) Encode(n int64) string Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ This section is empty. Types ¶ type Shortener ¶ type Shortener struct { // contains filtered or unexported fields } func NewShortener ¶ func NewShortener(alphabet string) *Shortener func (*Shortener) Decode ¶ func (shorten *Shortener) Decode(s string) int64 func (*Shortener) Encode ¶ func (shorten *Shortener) Encode(n int64) string Source Files ¶ View all Source files shortener.go Click to show internal directories. Click to hide internal directories.