fix: resolve mnd lint issues with named constants
This commit is contained in:
@@ -41,8 +41,10 @@ func (s *Handlers) requireAuth(w http.ResponseWriter, r *http.Request) (string,
|
||||
return uid, nick, true
|
||||
}
|
||||
|
||||
const idBytes = 16
|
||||
|
||||
func generateID() string {
|
||||
b := make([]byte, 16)
|
||||
b := make([]byte, idBytes)
|
||||
_, _ = rand.Read(b)
|
||||
|
||||
return hex.EncodeToString(b)
|
||||
|
||||
Reference in New Issue
Block a user