mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-26 22:04:32 +02:00
Reimplement and simplify Hugo's template system
See #13541 for details. Fixes #13545 Fixes #13515 Closes #7964 Closes #13365 Closes #12988 Closes #4891
This commit is contained in:
30
tpl/tplimpl/category_string.go
Normal file
30
tpl/tplimpl/category_string.go
Normal file
@@ -0,0 +1,30 @@
|
||||
// Code generated by "stringer -type Category"; DO NOT EDIT.
|
||||
|
||||
package tplimpl
|
||||
|
||||
import "strconv"
|
||||
|
||||
func _() {
|
||||
// An "invalid array index" compiler error signifies that the constant values have changed.
|
||||
// Re-run the stringer command to generate them again.
|
||||
var x [1]struct{}
|
||||
_ = x[CategoryLayout-1]
|
||||
_ = x[CategoryBaseof-2]
|
||||
_ = x[CategoryMarkup-3]
|
||||
_ = x[CategoryShortcode-4]
|
||||
_ = x[CategoryPartial-5]
|
||||
_ = x[CategoryServer-6]
|
||||
_ = x[CategoryHugo-7]
|
||||
}
|
||||
|
||||
const _Category_name = "CategoryLayoutCategoryBaseofCategoryMarkupCategoryShortcodeCategoryPartialCategoryServerCategoryHugo"
|
||||
|
||||
var _Category_index = [...]uint8{0, 14, 28, 42, 59, 74, 88, 100}
|
||||
|
||||
func (i Category) String() string {
|
||||
i -= 1
|
||||
if i < 0 || i >= Category(len(_Category_index)-1) {
|
||||
return "Category(" + strconv.FormatInt(int64(i+1), 10) + ")"
|
||||
}
|
||||
return _Category_name[_Category_index[i]:_Category_index[i+1]]
|
||||
}
|
Reference in New Issue
Block a user