mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2025-04-19 13:32:24 +00:00
Refactoring
This commit is contained in:
parent
1aff920e83
commit
c14c82767a
1 changed files with 2 additions and 1 deletions
|
@ -73,7 +73,7 @@ const (
|
||||||
EmptyTelegramUserID = int64(0)
|
EmptyTelegramUserID = int64(0)
|
||||||
)
|
)
|
||||||
|
|
||||||
const charset = "abcdefghijklmnopqrstuvwxyz0123456789"
|
|
||||||
|
|
||||||
type Tgbot struct {
|
type Tgbot struct {
|
||||||
inboundService InboundService
|
inboundService InboundService
|
||||||
|
@ -453,6 +453,7 @@ func (t *Tgbot) sendResponse(chatId int64, msg string, onlyMessage, isAdmin bool
|
||||||
|
|
||||||
|
|
||||||
func (t *Tgbot) randomLowerAndNum(length int) string {
|
func (t *Tgbot) randomLowerAndNum(length int) string {
|
||||||
|
charset := "abcdefghijklmnopqrstuvwxyz0123456789"
|
||||||
bytes := make([]byte, length)
|
bytes := make([]byte, length)
|
||||||
for i := range bytes {
|
for i := range bytes {
|
||||||
randomIndex, _ := rand.Int(rand.Reader, big.NewInt(int64(len(charset))))
|
randomIndex, _ := rand.Int(rand.Reader, big.NewInt(int64(len(charset))))
|
||||||
|
|
Loading…
Reference in a new issue