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  }
    17  
    18  const _element_name = "elementNoneelementScriptelementStyleelementTextareaelementTitle"
    19  
    20  var _element_index = [...]uint8{0, 11, 24, 36, 51, 63}
    21  
    22  func (i element) String() string {
    23  	if i >= element(len(_element_index)-1) {
    24  		return "element(" + strconv.FormatInt(int64(i), 10) + ")"
    25  	}
    26  	return _element_name[_element_index[i]:_element_index[i+1]]
    27  }
    28  

View as plain text