init: hgmj server initial commit

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
2026-10-08 16:50:13 +08:00
co-authored by Claude Opus 4.7
commit 625e89c15d
1870 changed files with 254090 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
}