fix: resolve mnd lint issues with named constants
This commit is contained in:
1 parent
c6c5aaf48e
commit
f6ca154315
3 files changed
+30
-10
No files matched your search
@@ -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