Simplify base62.Random (#5982)

Also move existing base62 encode/decode operations to their only points
of use.
This commit is contained in:
Jim Kalafut
2018-12-20 07:40:01 -08:00
committed by GitHub
parent b10ae71509
commit 70408512ac
10 changed files with 60 additions and 151 deletions

View File

@@ -255,7 +255,7 @@ func generateData() map[string][]byte {
for i := 0; i < 500; i++ {
segments := make([]string, rand.Intn(8)+1)
for j := 0; j < len(segments); j++ {
s, _ := base62.Random(6, false)
s, _ := base62.Random(6)
segments[j] = s
}
data := make([]byte, 100)