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:
Joe Mooring
2021-11-01 10:43:41 -07:00
committed by Bjørn Erik Pedersen
parent 0cc39af682
commit 04a3b45db4
2 changed files with 64 additions and 5 deletions

View File

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