...

Source file src/golang.org/x/text/width/kind_string.go

Documentation: golang.org/x/text/width

     1  // Code generated by "stringer -type=Kind"; DO NOT EDIT.
     2  
     3  package width
     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[Neutral-0]
    12  	_ = x[EastAsianAmbiguous-1]
    13  	_ = x[EastAsianWide-2]
    14  	_ = x[EastAsianNarrow-3]
    15  	_ = x[EastAsianFullwidth-4]
    16  	_ = x[EastAsianHalfwidth-5]
    17  }
    18  
    19  const _Kind_name = "NeutralEastAsianAmbiguousEastAsianWideEastAsianNarrowEastAsianFullwidthEastAsianHalfwidth"
    20  
    21  var _Kind_index = [...]uint8{0, 7, 25, 38, 53, 71, 89}
    22  
    23  func (i Kind) String() string {
    24  	if i < 0 || i >= Kind(len(_Kind_index)-1) {
    25  		return "Kind(" + strconv.FormatInt(int64(i), 10) + ")"
    26  	}
    27  	return _Kind_name[_Kind_index[i]:_Kind_index[i+1]]
    28  }
    29  

View as plain text