From 506820435cacb39ce7bb1835f46a15e913b95828 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Erik=20Pedersen?= Date: Fri, 9 Oct 2020 10:00:50 +0200 Subject: lang/i18n: Fix for language code case issue with pt-br etc. Fixes #7804 --- htesting/test_helpers.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'htesting/test_helpers.go') diff --git a/htesting/test_helpers.go b/htesting/test_helpers.go index 3804f28fe..599e460f6 100644 --- a/htesting/test_helpers.go +++ b/htesting/test_helpers.go @@ -51,10 +51,11 @@ func BailOut(after time.Duration) { } -var rnd = rand.New(rand.NewSource(time.Now().UnixNano())) +// Rnd is used only for testing. +var Rnd = rand.New(rand.NewSource(time.Now().UnixNano())) -func RandIntn(n int) int { - return rnd.Intn(n) +func RandBool() bool { + return Rnd.Intn(2) != 0 } // DiffStringSlices returns the difference between two string slices. -- cgit v1.2.3