From 514e68be5410aa6f6e8ed1ba982af11ea1c342ec Mon Sep 17 00:00:00 2001 From: Winni Neessen Date: Tue, 27 Feb 2024 11:43:05 +0100 Subject: [PATCH] Update variable name in random.go Changed the abbreviation 'idx' to 'i' in the 'random.go' file. This change makes the variable roles much clearer and aligns the naming with Go's best practice, enhancing readability and maintainability. --- random.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/random.go b/random.go index ed663f2..831b118 100644 --- a/random.go +++ b/random.go @@ -42,8 +42,8 @@ func randomStringSecure(length int) (string, error) { } char, rest = binary.BigEndian.Uint64(randPool), letterIdxMax } - if idx := int(char & letterIdxMask); idx < charRangeLength { - randString.WriteByte(cr[idx]) + if i := int(char & letterIdxMask); i < charRangeLength { + randString.WriteByte(cr[i]) idx-- } char >>= letterIdxBits