diff pkg/common/random.go @ 1326:515815565bd0

Simplified code a bit.
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Sun, 25 Nov 2018 10:51:54 +0100
parents a244b18cb916
children 6a021108410b
line wrap: on
line diff
--- a/pkg/common/random.go	Sun Nov 25 10:45:52 2018 +0100
+++ b/pkg/common/random.go	Sun Nov 25 10:51:54 2018 +0100
@@ -51,7 +51,7 @@
 			out[i] = alphabet[v.Int64()]
 		}
 		// Ensure at least one special char.
-		if bytes.IndexAny(out, special) >= 0 {
+		if bytes.ContainsAny(out, special) {
 			return string(out)
 		}
 	}