lang/i18n: Fix for language code case issue with pt-br etc.

Fixes #7804
This commit is contained in:
Bjørn Erik Pedersen 2020-10-09 10:00:50 +02:00
parent 49972d0792
commit 506820435c
6 changed files with 77 additions and 8 deletions

View file

@ -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.