github.com/quay/claircore@v1.5.28/severity_string.go (about)

     1  // Code generated by "stringer -type=Severity"; DO NOT EDIT.
     2  
     3  package claircore
     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[Unknown-0]
    12  	_ = x[Negligible-1]
    13  	_ = x[Low-2]
    14  	_ = x[Medium-3]
    15  	_ = x[High-4]
    16  	_ = x[Critical-5]
    17  }
    18  
    19  const _Severity_name = "UnknownNegligibleLowMediumHighCritical"
    20  
    21  var _Severity_index = [...]uint8{0, 7, 17, 20, 26, 30, 38}
    22  
    23  func (i Severity) String() string {
    24  	if i >= Severity(len(_Severity_index)-1) {
    25  		return "Severity(" + strconv.FormatInt(int64(i), 10) + ")"
    26  	}
    27  	return _Severity_name[_Severity_index[i]:_Severity_index[i+1]]
    28  }