Initial commit

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
2026-09-15 13:57:10 +08:00
co-authored by Claude Opus 5
commit 8679200f41
1897 changed files with 257900 additions and 0 deletions
+22
View File
@@ -0,0 +1,22 @@
package common
import "math/rand"
/**
* 生成邀请码
*/
var (
//所有的字符
allChars = []string{"2", "3", "4", "5", "6", "7", "8", "9", "A", "B", "C", "D", "E", "F", "G", "H", "J", "K", "L", "M", "N", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z"}
//默认长度
defaultLen = 6
)
func InvitePromotionCodeGenera() string {
result := ""
for i := 0; i < defaultLen; i++ {
index := rand.Intn(len(allChars))
result += allChars[index]
}
return result
}