Better var name to avoid confusion with type name.
This commit is contained in:
parent
b09047d1ee
commit
29a0069dc7
@ -58,8 +58,8 @@ func NewLenChars(length int, chars []byte) string {
|
|||||||
if _, err := io.ReadFull(rand.Reader, r); err != nil {
|
if _, err := io.ReadFull(rand.Reader, r); err != nil {
|
||||||
panic("error reading from random source: " + err.Error())
|
panic("error reading from random source: " + err.Error())
|
||||||
}
|
}
|
||||||
for _, byte := range r {
|
for _, rb := range r {
|
||||||
c := int(byte)
|
c := int(rb)
|
||||||
if c > maxrb {
|
if c > maxrb {
|
||||||
// Skip this number to avoid modulo bias.
|
// Skip this number to avoid modulo bias.
|
||||||
continue
|
continue
|
||||||
|
Loading…
Reference in New Issue
Block a user