mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-14 20:33:59 +02:00
@@ -24,6 +24,7 @@ import (
|
||||
"github.com/spf13/cast"
|
||||
"github.com/yuin/goldmark/util"
|
||||
|
||||
"github.com/gohugoio/hugo/common/hugo"
|
||||
"github.com/gohugoio/hugo/deps"
|
||||
)
|
||||
|
||||
@@ -156,3 +157,26 @@ func (t *timer) Stop() string {
|
||||
// This is used in templates, we need to return something.
|
||||
return ""
|
||||
}
|
||||
|
||||
// Internal template func, used in tests only.
|
||||
func (ns *Namespace) TestDeprecationInfo(item, alternative string) string {
|
||||
v := hugo.CurrentVersion
|
||||
hugo.Deprecate(item, alternative, v.String())
|
||||
return ""
|
||||
}
|
||||
|
||||
// Internal template func, used in tests only.
|
||||
func (ns *Namespace) TestDeprecationWarn(item, alternative string) string {
|
||||
v := hugo.CurrentVersion
|
||||
v.Minor -= 6
|
||||
hugo.Deprecate(item, alternative, v.String())
|
||||
return ""
|
||||
}
|
||||
|
||||
// Internal template func, used in tests only.
|
||||
func (ns *Namespace) TestDeprecationErr(item, alternative string) string {
|
||||
v := hugo.CurrentVersion
|
||||
v.Minor -= 12
|
||||
hugo.Deprecate(item, alternative, v.String())
|
||||
return ""
|
||||
}
|
||||
|
Reference in New Issue
Block a user