mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-28 22:19:59 +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:
25
tpl/tplimpl/subcategory_string.go
Normal file
25
tpl/tplimpl/subcategory_string.go
Normal file
@@ -0,0 +1,25 @@
|
||||
// Code generated by "stringer -type SubCategory"; 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[SubCategoryMain-0]
|
||||
_ = x[SubCategoryEmbedded-1]
|
||||
_ = x[SubCategoryInline-2]
|
||||
}
|
||||
|
||||
const _SubCategory_name = "SubCategoryMainSubCategoryEmbeddedSubCategoryInline"
|
||||
|
||||
var _SubCategory_index = [...]uint8{0, 15, 34, 51}
|
||||
|
||||
func (i SubCategory) String() string {
|
||||
if i < 0 || i >= SubCategory(len(_SubCategory_index)-1) {
|
||||
return "SubCategory(" + strconv.FormatInt(int64(i), 10) + ")"
|
||||
}
|
||||
return _SubCategory_name[_SubCategory_index[i]:_SubCategory_index[i+1]]
|
||||
}
|
Reference in New Issue
Block a user