From cac4ed5e6a762708157b409f4395d0b477a85160 Mon Sep 17 00:00:00 2001 From: gouguoyin <245629560@qq.com> Date: Fri, 22 Nov 2024 22:43:06 +0800 Subject: [PATCH] Update content --- README.cn.md | 2 +- README.md | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.cn.md b/README.cn.md index 3c4078f..1c95b0c 100755 --- a/README.cn.md +++ b/README.cn.md @@ -134,7 +134,7 @@ dongle.Decode.FromBytes([]byte("AAwf93rvy4aWQVw")).ByBase62().ToBytes() // []byt // 自定义编码表对字节切片进行 base62 编码,输出字节切片 dongle.Encode.FromBytes([]byte("hello world")).ByBase62("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789").ToBytes() // []byte("KK6pJD158Ekgaf6") // 自定义编码表对字节切片进行 base62 解码,输出字节切片 -dongle.Decode.FromBytes([]byte("KK6pJD158Ekgaf6")).ByBase62().ToBytes("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789") // []byte("hello world") +dongle.Decode.FromBytes([]byte("KK6pJD158Ekgaf6")).ByBase62("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789").ToBytes() // []byte("hello world") ``` ##### Base64 编码、解码 diff --git a/README.md b/README.md index bf566db..6718c05 100644 --- a/README.md +++ b/README.md @@ -37,7 +37,7 @@ go get -u gitcode.com/dromara/dongle import "gitcode.com/dromara/dongle" ``` -Because `dongle` was donated to the [dromara](https://dromara.org/ "dromara") organization, the repository url has changed. If the previous repository used was `golang-module/dongle`, please replace the original repository with the new repository in `go.mod`, for example +`dongle` was donated to the [dromara](https://dromara.org/ "dromara") organization, the repository url has changed. If the previous repository used was `golang-module/dongle`, please replace the original repository with the new repository in `go.mod`, for example ```go go mod edit -replace github.com/golang-module/dongle=github.com/dromara/dongle @@ -135,7 +135,7 @@ dongle.Decode.FromBytes([]byte("AAwf93rvy4aWQVw")).ByBase62().ToBytes() // []byt // Encode by base62 with custom alphabet from byte slice and output byte slice dongle.Encode.FromBytes([]byte("hello world")).ByBase62("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789").ToBytes() // []byte("KK6pJD158Ekgaf6") // Decode by base62 with custom alphabet from byte slice and output byte slice -dongle.Decode.FromBytes([]byte("KK6pJD158Ekgaf6")).ByBase62().ToBytes("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789") // []byte("hello world") +dongle.Decode.FromBytes([]byte("KK6pJD158Ekgaf6")).ByBase62("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789").ToBytes() // []byte("hello world") ``` ##### Encode and decode by base64