diff options
author | Joe Mooring <[email protected]> | 2023-09-26 14:04:01 -0700 |
---|---|---|
committer | Bjørn Erik Pedersen <[email protected]> | 2023-09-27 17:34:45 +0200 |
commit | 46da0b7aaa231cc5e56ad79eb71c4fc3f7a38a29 (patch) | |
tree | 74d5b5672efeada911468af267f3733e7021b3ca /tpl | |
parent | 75f56b4ce6bff053cb212bfadf8afd3fc01718d4 (diff) | |
download | hugo-46da0b7aaa231cc5e56ad79eb71c4fc3f7a38a29.tar.gz hugo-46da0b7aaa231cc5e56ad79eb71c4fc3f7a38a29.zip |
tpl/lang: Formally deprecate lang.NumFmt
Use lang.FormatNumberCustom instead.
Diffstat (limited to 'tpl')
-rw-r--r-- | tpl/lang/lang.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tpl/lang/lang.go b/tpl/lang/lang.go index 814191c3a..e83f70710 100644 --- a/tpl/lang/lang.go +++ b/tpl/lang/lang.go @@ -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...) } |