文件名称:bijectiv:Go中用于URL缩短器编码解码的库
文件大小:3KB
文件格式:ZIP
更新时间:2024-06-10 08:15:55
url-shortener Go
双射 Bijective编码功能实现,可用于URL缩短器。 安装 go get github.com/leonardoeloy/bijectiv 用法 package main import ( "github.com/leonardoeloy/bijectiv" "fmt" ) func main () { b := bijectiv . New () fmt . Printf ( "Encoded value of 100 is %s \n " , b . Encode ( 100 )) fmt . Printf ( "Decoded value of 'bM' is %d \n " , b . Decode ( "bM" )) b = bijectiv . NewAlphabet ( "MYRESTRICTEDALPHABET" ) fmt . Printf ( "
【文件预览】:
bijectiv-master
----.gitignore(36B)
----bijectiv_test.go(1KB)
----.travis.yml(68B)
----LICENSE(1KB)
----README.md(770B)
----bijectiv.go(1KB)