Source file src/html/template/urlpart_string.go

     1  // Code generated by "stringer -type urlPart"; 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[urlPartNone-0]
    12  	_ = x[urlPartPreQuery-1]
    13  	_ = x[urlPartQueryOrFrag-2]
    14  	_ = x[urlPartUnknown-3]
    15  }
    16  
    17  const _urlPart_name = "urlPartNoneurlPartPreQueryurlPartQueryOrFragurlPartUnknown"
    18  
    19  var _urlPart_index = [...]uint8{0, 11, 26, 44, 58}
    20  
    21  func (i urlPart) String() string {
    22  	if i >= urlPart(len(_urlPart_index)-1) {
    23  		return "urlPart(" + strconv.FormatInt(int64(i), 10) + ")"
    24  	}
    25  	return _urlPart_name[_urlPart_index[i]:_urlPart_index[i+1]]
    26  }
    27  

View as plain text