mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-05-17 04:27:47 +08:00
fix code
This commit is contained in:
@@ -1,10 +1,18 @@
|
||||
package stringutils2
|
||||
|
||||
import (
|
||||
"crypto/md5"
|
||||
"encoding/hex"
|
||||
"fmt"
|
||||
"strings"
|
||||
)
|
||||
|
||||
func GetMD5Hash(text string) string {
|
||||
hasher := md5.New()
|
||||
hasher.Write([]byte(text))
|
||||
return hex.EncodeToString(hasher.Sum(nil))
|
||||
}
|
||||
|
||||
func EscapeString(str string, pairs [][]string) string {
|
||||
if len(pairs) == 0 {
|
||||
pairs = [][]string{
|
||||
|
||||
Reference in New Issue
Block a user