mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-19 21:21:39 +02:00
tpl/strings: Remove overflow check in strings.Repeat
The test fails on 32 bit systems. Let it panic instead.
This commit is contained in:
@@ -432,8 +432,6 @@ func (ns *Namespace) Repeat(n, s interface{}) (string, error) {
|
||||
|
||||
if sn < 0 {
|
||||
return "", errors.New("strings: negative Repeat count")
|
||||
} else if sn > 0 && len(ss)*sn/sn != len(ss) {
|
||||
return "", errors.New("strings: Repeat count causes overflow")
|
||||
}
|
||||
|
||||
return _strings.Repeat(ss, sn), nil
|
||||
|
Reference in New Issue
Block a user