github.com/minio/madmin-go@v1.7.5/estream/blockid_string.go (about)

     1  // Code generated by "stringer -type=blockID -trimprefix=block"; DO NOT EDIT.
     2  
     3  package estream
     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[blockPlainKey-1]
    12  	_ = x[blockEncryptedKey-2]
    13  	_ = x[blockEncStream-3]
    14  	_ = x[blockPlainStream-4]
    15  	_ = x[blockDatablock-5]
    16  	_ = x[blockEOS-6]
    17  	_ = x[blockEOF-7]
    18  	_ = x[blockError-8]
    19  }
    20  
    21  const _blockID_name = "PlainKeyEncryptedKeyEncStreamPlainStreamDatablockEOSEOFError"
    22  
    23  var _blockID_index = [...]uint8{0, 8, 20, 29, 40, 49, 52, 55, 60}
    24  
    25  func (i blockID) String() string {
    26  	i -= 1
    27  	if i < 0 || i >= blockID(len(_blockID_index)-1) {
    28  		return "blockID(" + strconv.FormatInt(int64(i+1), 10) + ")"
    29  	}
    30  	return _blockID_name[_blockID_index[i]:_blockID_index[i+1]]
    31  }