♻️ Refactor code

🔥 Remove update detection
This commit is contained in:
2024-04-23 14:47:53 +08:00
parent ebc91d8aad
commit ac4ad3c8aa
16 changed files with 39 additions and 94 deletions

13
common/random_string.go Normal file
View File

@ -0,0 +1,13 @@
package common
import "math/rand"
func RandomString(length int) string {
// 生成随机字符串
const charset = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"
var result []byte
for i := 0; i < length; i++ {
result = append(result, charset[rand.Intn(len(charset))])
}
return string(result)
}