Source file src/html/template/element_string.go

     1  // Code generated by "stringer -type element"; DO NOT EDIT.
     2  
     3  package template
     4  
     5  import "strconv"
     6  
     7  func _() {
     8  	// An "invalid array index" compiler error signifies that the constant values have changed.
     9  	// Re-run the stringer command to generate them again.
    10  	var x [1]struct{}
    11  	_ = x[elementNone-0]
    12  	_ = x[elementScript-1]
    13  	_ = x[elementStyle-2]
    14  	_ = x[elementTextarea-3]
    15  	_ = x[elementTitle-4]
    16  	_ = x[elementMeta-5]
    17  }
    18  
    19  const _element_name = "elementNoneelementScriptelementStyleelementTextareaelementTitleelementMeta"
    20  
    21  var _element_index = [...]uint8{0, 11, 24, 36, 51, 63, 74}
    22  
    23  func (i element) String() string {
    24  	if i >= element(len(_element_index)-1) {
    25  		return "element(" + strconv.FormatInt(int64(i), 10) + ")"
    26  	}
    27  	return _element_name[_element_index[i]:_element_index[i+1]]
    28  }
    29  

View as plain text