github.com/cockroachdb/cockroach@v20.2.0-alpha.1+incompatible/pkg/sql/sqlbase/formatversion_string.go (about)

     1  // Code generated by "stringer -type=FormatVersion"; DO NOT EDIT.
     2  
     3  package sqlbase
     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[BaseFormatVersion-1]
    12  	_ = x[FamilyFormatVersion-2]
    13  	_ = x[InterleavedFormatVersion-3]
    14  }
    15  
    16  const _FormatVersion_name = "BaseFormatVersionFamilyFormatVersionInterleavedFormatVersion"
    17  
    18  var _FormatVersion_index = [...]uint8{0, 17, 36, 60}
    19  
    20  func (i FormatVersion) String() string {
    21  	i -= 1
    22  	if i >= FormatVersion(len(_FormatVersion_index)-1) {
    23  		return "FormatVersion(" + strconv.FormatInt(int64(i+1), 10) + ")"
    24  	}
    25  	return _FormatVersion_name[_FormatVersion_index[i]:_FormatVersion_index[i+1]]
    26  }