mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-07 20:30:36 -05:00
tpl/lang: Formally deprecate lang.NumFmt
Use lang.FormatNumberCustom instead.
This commit is contained in:
parent
75f56b4ce6
commit
46da0b7aaa
1 changed files with 3 additions and 3 deletions
|
@ -28,6 +28,7 @@ import (
|
|||
|
||||
"github.com/gohugoio/hugo/common/hreflect"
|
||||
"github.com/gohugoio/hugo/deps"
|
||||
"github.com/gohugoio/hugo/helpers"
|
||||
"github.com/spf13/cast"
|
||||
)
|
||||
|
||||
|
@ -240,10 +241,9 @@ func (ns *Namespace) FormatNumberCustom(precision, number any, options ...any) (
|
|||
return string(b), nil
|
||||
}
|
||||
|
||||
// NumFmt is deprecated, use FormatNumberCustom.
|
||||
// We renamed this in Hugo 0.87.
|
||||
// Deprecated: Use FormatNumberCustom
|
||||
// Deprecated: Use lang.FormatNumberCustom instead.
|
||||
func (ns *Namespace) NumFmt(precision, number any, options ...any) (string, error) {
|
||||
helpers.Deprecated("lang.NumFmt", "Use lang.FormatNumberCustom instead.", false)
|
||||
return ns.FormatNumberCustom(precision, number, options...)
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue