/
githubmirror
/
photoprism
Обзор
Документация
Войти
/
githubmirror
/
photoprism
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
develop
pkg/rnd/client.go
20 строк
492 B
Michael Mayer
Pkg: Apply "golangci-lint" recommendations to rnd package #5330
21 ноя 2025, 17:40
21 ноя 2025, 17:40
7cb639d
Код
Авторство
О чём код?
package rnd const ( // ClientSecretLength defines the length of generated client secrets. ClientSecretLength = 32 ) // ClientSecret generates a random client secret containing 32 upper and lower case letters as well as numbers. func ClientSecret() string { return Base62(ClientSecretLength) } // IsClientSecret checks if the string represents a valid client secret. func IsClientSecret(s string) bool { if l := len(s); l == ClientSecretLength { return IsAlnum(s) } return false }