Source file src/html/template/attr_string.go

     1  // Code generated by "stringer -type attr"; 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[attrNone-0]
    12  	_ = x[attrScript-1]
    13  	_ = x[attrScriptType-2]
    14  	_ = x[attrStyle-3]
    15  	_ = x[attrURL-4]
    16  	_ = x[attrSrcset-5]
    17  }
    18  
    19  const _attr_name = "attrNoneattrScriptattrScriptTypeattrStyleattrURLattrSrcset"
    20  
    21  var _attr_index = [...]uint8{0, 8, 18, 32, 41, 48, 58}
    22  
    23  func (i attr) String() string {
    24  	if i >= attr(len(_attr_index)-1) {
    25  		return "attr(" + strconv.FormatInt(int64(i), 10) + ")"
    26  	}
    27  	return _attr_name[_attr_index[i]:_attr_index[i+1]]
    28  }
    29  

View as plain text