[agent-deploy] - basic accomplish

This commit is contained in:
zeaslity
2024-04-25 16:44:40 +08:00
parent 4e5af5856a
commit 08e5a4d422
51 changed files with 8751 additions and 210 deletions

View File

@@ -0,0 +1,17 @@
package utils
import (
"math/rand"
"time"
)
func GenerateRandomString(length int) string {
rand.Seed(time.Now().UnixNano())
chars := "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890"
b := make([]byte, length)
for i := range b {
b[i] = chars[rand.Intn(len(chars))]
}
return string(b)
}