29 Star 299 Fork 61

GVPdromara/dongle

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
base32.go 565 Bytes
一键复制 编辑 原始数据 按行查看 历史
kuafuRace 提交于 2021-08-24 14:11 +08:00 . optimize code
package dongle
import (
"encoding/base32"
)
// ByBase32 encodes by base32.
func (e encode) ByBase32() encode {
input, output := e.input, e.output
if input == nil {
return e
}
if output != nil {
input = output
}
e.output = string2bytes(base32.StdEncoding.EncodeToString(input))
return e
}
// ByBase32 encodes by base32.
func (d decode) ByBase32() decode {
input, output := d.input, d.output
if input == nil {
return d
}
if output != nil {
input = output
}
d.output, d.Error = base32.StdEncoding.DecodeString(bytes2string(input))
return d
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Go
1
https://gitee.com/dromara/dongle.git
git@gitee.com:dromara/dongle.git
dromara
dongle
dongle
v0.0.2

搜索帮助