github.com/quay/claircore@v1.5.28/libvuln/driver/matchconstraint_string.go (about)

     1  // Code generated by "stringer -type MatchConstraint"; DO NOT EDIT.
     2  
     3  package driver
     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[PackageSourceName-1]
    12  	_ = x[PackageName-2]
    13  	_ = x[PackageModule-3]
    14  	_ = x[DistributionDID-4]
    15  	_ = x[DistributionName-5]
    16  	_ = x[DistributionVersion-6]
    17  	_ = x[DistributionVersionCodeName-7]
    18  	_ = x[DistributionVersionID-8]
    19  	_ = x[DistributionArch-9]
    20  	_ = x[DistributionCPE-10]
    21  	_ = x[DistributionPrettyName-11]
    22  	_ = x[RepositoryName-12]
    23  }
    24  
    25  const _MatchConstraint_name = "PackageSourceNamePackageNamePackageModuleDistributionDIDDistributionNameDistributionVersionDistributionVersionCodeNameDistributionVersionIDDistributionArchDistributionCPEDistributionPrettyNameRepositoryName"
    26  
    27  var _MatchConstraint_index = [...]uint8{0, 17, 28, 41, 56, 72, 91, 118, 139, 155, 170, 192, 206}
    28  
    29  func (i MatchConstraint) String() string {
    30  	i -= 1
    31  	if i < 0 || i >= MatchConstraint(len(_MatchConstraint_index)-1) {
    32  		return "MatchConstraint(" + strconv.FormatInt(int64(i+1), 10) + ")"
    33  	}
    34  	return _MatchConstraint_name[_MatchConstraint_index[i]:_MatchConstraint_index[i+1]]
    35  }