mirror of
https://github.com/gohugoio/hugo.git
synced 2025-04-26 13:40:38 +03:00
lang/i18n: Fix for language code case issue with pt-br etc.
Fixes #7804
This commit is contained in:
parent
49972d0792
commit
506820435c
6 changed files with 77 additions and 8 deletions
|
@ -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.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue