mirror of
https://github.com/mjl-/mox.git
synced 2025-07-12 19:44:34 +03:00
Run modernize to rewrite some older go constructs to newer ones
Mostly using slice.Sort, using min/max, slices.Concat, range of int and fmt.Appendf for byte slices instead of strings.
This commit is contained in:
@ -8,7 +8,7 @@ func GeneratePassword() string {
|
||||
chars := "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!@#$%^&*-_;:,<.>/"
|
||||
s := ""
|
||||
buf := make([]byte, 1)
|
||||
for i := 0; i < 12; i++ {
|
||||
for range 12 {
|
||||
for {
|
||||
cryptorand.Read(buf)
|
||||
i := int(buf[0])
|
||||
|
Reference in New Issue
Block a user