1
0
mirror of https://github.com/duke-git/lancet.git synced 2026-02-09 07:02:29 +08:00

fmt: fix some gofmt issue

This commit is contained in:
dudaodong
2021-11-29 13:01:46 +08:00
parent 4848647918
commit 0c4b512084
14 changed files with 46 additions and 44 deletions

View File

@@ -65,7 +65,7 @@ func AesCbcEncrypt(data, key []byte) []byte {
return encrypted
}
// AesEcbDecrypt decrypt data with key use AES CBC algorithm
// AesCbcDecrypt decrypt data with key use AES CBC algorithm
// len(key) should be 16, 24 or 32
func AesCbcDecrypt(encrypted, key []byte) []byte {
block, _ := aes.NewCipher(key)

View File

@@ -21,13 +21,13 @@ func Base64StdEncode(s string) string {
return base64.StdEncoding.EncodeToString([]byte(s))
}
// Base64StdEncode decode a base64 encoded string
// Base64StdDecode decode a base64 encoded string
func Base64StdDecode(s string) string {
b, _ := base64.StdEncoding.DecodeString(s)
return string(b)
}
// Md5Str return the md5 value of string
// Md5String return the md5 value of string
func Md5String(s string) string {
h := md5.New()
h.Write([]byte(s))