本文整理汇总了Golang中github.com/spf13/hugo/helpers.Deprecated函数的典型用法代码示例。如果您正苦于以下问题:Golang Deprecated函数的具体用法?Golang Deprecated怎么用?Golang Deprecated使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了Deprecated函数的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Golang代码示例。
示例1: Recent
// Recent is deprecated. Will be removed in 0.15.
func (s *SiteInfo) Recent() *Pages {
helpers.Deprecated("Site", ".Recent", ".Pages")
return s.Pages
}
示例2: Indexes
// Indexes is deprecated. Will be removed in 0.15.
func (s *SiteInfo) Indexes() *TaxonomyList {
helpers.Deprecated("Site", ".Indexes", ".Taxonomies")
return &s.Taxonomies
}
示例3: Url
// Url is deprecated. Will be removed in 0.15.
func (p *Pager) Url() template.HTML {
helpers.Deprecated("Paginator", ".Url", ".URL")
return p.URL()
}
示例4: BaseUrl
// BaseUrl is deprecated. Will be removed in 0.15.
func (s *SiteInfo) BaseUrl() template.URL {
helpers.Deprecated("Site", ".BaseUrl", ".BaseURL")
return s.BaseURL
}
示例5: FuzzyWordCount
func (*PageMeta) FuzzyWordCount() int {
helpers.Deprecated("PageMeta", "FuzzyWordCount", ".FuzzyWordCount (on Page)")
return 0
}
示例6: ReadingTime
func (*PageMeta) ReadingTime() int {
helpers.Deprecated("PageMeta", "ReadingTime", ".ReadingTime (on Page)")
return 0
}
示例7: Url
// Url is deprecated. Will be removed in 0.15.
func (me *MenuEntry) Url() string {
helpers.Deprecated("MenuEntry", ".Url", ".URL")
return me.URL
}
示例8: init
func init() {
funcMap = template.FuncMap{
"urlize": helpers.URLize,
"sanitizeURL": helpers.SanitizeURL,
"sanitizeurl": helpers.SanitizeURL,
"eq": Eq,
"ne": Ne,
"gt": Gt,
"ge": Ge,
"lt": Lt,
"le": Le,
"in": In,
"slicestr": Slicestr,
"substr": Substr,
"split": Split,
"intersect": Intersect,
"isSet": IsSet,
"isset": IsSet,
"echoParam": ReturnWhenSet,
"safeHTML": SafeHTML,
"safeCSS": SafeCSS,
"safeURL": SafeURL,
"absURL": func(a string) template.HTML { return template.HTML(helpers.AbsURL(a)) },
"relURL": func(a string) template.HTML { return template.HTML(helpers.RelURL(a)) },
"markdownify": Markdownify,
"first": First,
"where": Where,
"delimit": Delimit,
"sort": Sort,
"highlight": Highlight,
"add": func(a, b interface{}) (interface{}, error) { return doArithmetic(a, b, '+') },
"sub": func(a, b interface{}) (interface{}, error) { return doArithmetic(a, b, '-') },
"div": func(a, b interface{}) (interface{}, error) { return doArithmetic(a, b, '/') },
"mod": Mod,
"mul": func(a, b interface{}) (interface{}, error) { return doArithmetic(a, b, '*') },
"modBool": ModBool,
"lower": func(a string) string { return strings.ToLower(a) },
"upper": func(a string) string { return strings.ToUpper(a) },
"title": func(a string) string { return strings.Title(a) },
"partial": Partial,
"ref": Ref,
"relref": RelRef,
"apply": Apply,
"chomp": Chomp,
"replace": Replace,
"trim": Trim,
"dateFormat": DateFormat,
"getJSON": GetJSON,
"getCSV": GetCSV,
"seq": helpers.Seq,
"getenv": func(varName string) string { return os.Getenv(varName) },
// "getJson" is deprecated. Will be removed in 0.15.
"getJson": func(urlParts ...string) interface{} {
helpers.Deprecated("Template", "getJson", "getJSON")
return GetJSON(urlParts...)
},
// "getJson" is deprecated. Will be removed in 0.15.
"getCsv": func(sep string, urlParts ...string) [][]string {
helpers.Deprecated("Template", "getCsv", "getCSV")
return GetCSV(sep, urlParts...)
},
// "safeHtml" is deprecated. Will be removed in 0.15.
"safeHtml": func(text string) template.HTML {
helpers.Deprecated("Template", "safeHtml", "safeHTML")
return SafeHTML(text)
},
// "safeCss" is deprecated. Will be removed in 0.15.
"safeCss": func(text string) template.CSS {
helpers.Deprecated("Template", "safeCss", "safeCSS")
return SafeCSS(text)
},
// "safeUrl" is deprecated. Will be removed in 0.15.
"safeUrl": func(text string) template.URL {
helpers.Deprecated("Template", "safeUrl", "safeURL")
return SafeURL(text)
},
}
}
示例9: Url
// Url is deprecated. Will be removed in 0.15.
func (up URLPath) Url() string {
helpers.Deprecated("URLPath", ".Url", ".URL")
return up.URL
}
示例10: UrlPath
// UrlPath is deprecated. Will be removed in 0.15.
func (n *Node) UrlPath() URLPath {
helpers.Deprecated("Node", ".UrlPath", ".URLPath")
return n.URLPath
}