Entire logging rework. Full error handling. Small improvements.
This commit is contained in:
@@ -8,7 +8,7 @@ import (
|
||||
func GenerateActivationCode() string {
|
||||
bytes := make([]byte, 16)
|
||||
if _, err := rand.Read(bytes); err != nil {
|
||||
panic(err) // Handle the error appropriately in production
|
||||
Logger.Fatalf("Error generating activation code: %v", err)
|
||||
}
|
||||
return hex.EncodeToString(bytes)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user