github.com/minio/minio@v0.0.0-20240328213742-3f72439b8a27/cmd/format_string.go (about)

     1  // Code generated by "stringer -type=format -trimprefix=format untar.go"; DO NOT EDIT.
     2  
     3  package cmd
     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[formatUnknown-0]
    12  	_ = x[formatGzip-1]
    13  	_ = x[formatZstd-2]
    14  	_ = x[formatLZ4-3]
    15  	_ = x[formatS2-4]
    16  	_ = x[formatBZ2-5]
    17  }
    18  
    19  const _format_name = "UnknownGzipZstdLZ4S2BZ2"
    20  
    21  var _format_index = [...]uint8{0, 7, 11, 15, 18, 20, 23}
    22  
    23  func (i format) String() string {
    24  	if i < 0 || i >= format(len(_format_index)-1) {
    25  		return "format(" + strconv.FormatInt(int64(i), 10) + ")"
    26  	}
    27  	return _format_name[_format_index[i]:_format_index[i+1]]
    28  }