Пока что только user contoller файл создал и пример генератора токенов

This commit is contained in:
songl 2024-06-06 14:35:19 +05:00
parent 1e4c23782b
commit 166a0183f6
1 changed files with 18 additions and 0 deletions

View File

@ -1 +1,19 @@
package controllers package controllers
// Пример генератора токена
import (
"crypto/rand"
"fmt"
)
func tokenGenerator() string {
b := make([]byte, 4)
rand.Read(b)
return fmt.Sprintf("%x", b)
}
func main() {
a := tokenGenerator()
fmt.Println(a)
}