mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-22 21:42:50 +02:00
Fix description of lang.FormatNumberCustom
It currently refers to itself as a simple alternative, when it should refer to lang.FormatNumber.
This commit is contained in:
committed by
Bjørn Erik Pedersen
parent
0cc39af682
commit
04a3b45db4
@@ -20,8 +20,8 @@ import (
|
||||
"strconv"
|
||||
"strings"
|
||||
|
||||
translators "github.com/gohugoio/localescompressed"
|
||||
"github.com/gohugoio/locales"
|
||||
translators "github.com/gohugoio/localescompressed"
|
||||
"github.com/pkg/errors"
|
||||
|
||||
"github.com/gohugoio/hugo/deps"
|
||||
@@ -138,7 +138,7 @@ func (ns *Namespace) castPrecisionNumber(precision, number interface{}) (uint64,
|
||||
// Note that numbers are rounded up at 5 or greater.
|
||||
// So, with precision set to 0, 1.5 becomes `2`, and 1.4 becomes `1`.
|
||||
//
|
||||
// For a simpler function that adapts to the current language, see FormatNumberCustom.
|
||||
// For a simpler function that adapts to the current language, see FormatNumber.
|
||||
func (ns *Namespace) FormatNumberCustom(precision, number interface{}, options ...interface{}) (string, error) {
|
||||
prec, err := cast.ToIntE(precision)
|
||||
if err != nil {
|
||||
|
Reference in New Issue
Block a user