storj.io/minio@v0.0.0-20230509071714-0cbc90f649b1/cmd/osmetric_string.go (about)

     1  // Code generated by "stringer -type=osMetric -trimprefix=osMetric os-instrumented.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[osMetricRemoveAll-0]
    12  	_ = x[osMetricMkdirAll-1]
    13  	_ = x[osMetricRename-2]
    14  	_ = x[osMetricOpenFile-3]
    15  	_ = x[osMetricOpen-4]
    16  	_ = x[osMetricOpenFileDirectIO-5]
    17  	_ = x[osMetricLstat-6]
    18  	_ = x[osMetricRemove-7]
    19  	_ = x[osMetricStat-8]
    20  	_ = x[osMetricAccess-9]
    21  	_ = x[osMetricLast-10]
    22  }
    23  
    24  const _osMetric_name = "RemoveAllMkdirAllRenameOpenFileOpenOpenFileDirectIOLstatRemoveStatAccessLast"
    25  
    26  var _osMetric_index = [...]uint8{0, 9, 17, 23, 31, 35, 51, 56, 62, 66, 72, 76}
    27  
    28  func (i osMetric) String() string {
    29  	if i >= osMetric(len(_osMetric_index)-1) {
    30  		return "osMetric(" + strconv.FormatInt(int64(i), 10) + ")"
    31  	}
    32  	return _osMetric_name[_osMetric_index[i]:_osMetric_index[i+1]]
    33  }