本文整理汇总了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
}
开发者ID:thegumza,项目名称:hugo,代码行数:5,代码来源:site.go
示例2: Indexes
// Indexes is deprecated. Will be removed in 0.15.
func (s *SiteInfo) Indexes() *TaxonomyList {
helpers.Deprecated("Site", ".Indexes", ".Taxonomies")
return &s.Taxonomies
}
开发者ID:thegumza,项目名称:hugo,代码行数:5,代码来源:site.go
示例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()
}
开发者ID:scottcwilson,项目名称:hugo,代码行数:5,代码来源:pagination.go
示例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
}
开发者ID:thegumza,项目名称:hugo,代码行数:5,代码来源:site.go
示例5: FuzzyWordCount
func (*PageMeta) FuzzyWordCount() int {
helpers.Deprecated("PageMeta", "FuzzyWordCount", ".FuzzyWordCount (on Page)")
return 0
}
开发者ID:digitalcraftsman,项目名称:hugo,代码行数:5,代码来源:page.go
示例6: ReadingTime
func (*PageMeta) ReadingTime() int {
helpers.Deprecated("PageMeta", "ReadingTime", ".ReadingTime (on Page)")
return 0
}
开发者ID:digitalcraftsman,项目名称:hugo,代码行数:4,代码来源:page.go
示例7: Url
// Url is deprecated. Will be removed in 0.15.
func (me *MenuEntry) Url() string {
helpers.Deprecated("MenuEntry", ".Url", ".URL")
return me.URL
}
开发者ID:nurhavid,项目名称:hugo,代码行数:5,代码来源:menu.go
示例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)
},
}
}
开发者ID:blevesearch,项目名称:hugoidx,代码行数:80,代码来源:template_funcs.go
示例9: Url
// Url is deprecated. Will be removed in 0.15.
func (up URLPath) Url() string {
helpers.Deprecated("URLPath", ".Url", ".URL")
return up.URL
}
开发者ID:scottcwilson,项目名称:hugo,代码行数:5,代码来源:node.go
示例10: UrlPath
// UrlPath is deprecated. Will be removed in 0.15.
func (n *Node) UrlPath() URLPath {
helpers.Deprecated("Node", ".UrlPath", ".URLPath")
return n.URLPath
}
开发者ID:scottcwilson,项目名称:hugo,代码行数:5,代码来源:node.go
注:本文中的github.com/spf13/hugo/helpers.Deprecated函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论