From ce0f473e81fdc8d043f9dae69a61050e3962e5ab Mon Sep 17 00:00:00 2001 From: Ted Unangst Date: Sun, 16 Jun 2019 19:18:33 -0400 Subject: [PATCH] unloop a one iteration loop --- fun.go | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/fun.go b/fun.go index 297ce50..1a14718 100644 --- a/fun.go +++ b/fun.go @@ -108,15 +108,13 @@ func shortxid(xid string) string { func xfiltrate() string { letters := "BCDFGHJKLMNPQRSTVWXYZbcdfghjklmnpqrstvwxyz1234567891234567891234" - for { - var b [18]byte - rand.Read(b[:]) - for i, c := range b { - b[i] = letters[c&63] - } - s := string(b[:]) - return s + var b [18]byte + rand.Read(b[:]) + for i, c := range b { + b[i] = letters[c&63] } + s := string(b[:]) + return s } var re_hashes = regexp.MustCompile(`(?:^|\W)#[[:alnum:]]+`)