From c14c82767a9f8c949cd9c1471be3b2c3e6c594b0 Mon Sep 17 00:00:00 2001 From: nistootsin <104831639+nistootsin@users.noreply.github.com> Date: Fri, 21 Mar 2025 18:57:50 +0330 Subject: [PATCH] Refactoring --- web/service/tgbot.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/web/service/tgbot.go b/web/service/tgbot.go index 544a7885..125b3d7e 100644 --- a/web/service/tgbot.go +++ b/web/service/tgbot.go @@ -73,7 +73,7 @@ const ( EmptyTelegramUserID = int64(0) ) -const charset = "abcdefghijklmnopqrstuvwxyz0123456789" + type Tgbot struct { inboundService InboundService @@ -453,6 +453,7 @@ func (t *Tgbot) sendResponse(chatId int64, msg string, onlyMessage, isAdmin bool func (t *Tgbot) randomLowerAndNum(length int) string { + charset := "abcdefghijklmnopqrstuvwxyz0123456789" bytes := make([]byte, length) for i := range bytes { randomIndex, _ := rand.Int(rand.Reader, big.NewInt(int64(len(charset))))