github.com/lestrrat-go/jwx/v2@v2.0.21/formatkind_string_gen.go (about)

     1  // Code generated by "stringer -type=FormatKind"; DO NOT EDIT.
     2  
     3  package jwx
     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[InvalidFormat-0]
    12  	_ = x[UnknownFormat-1]
    13  	_ = x[JWE-2]
    14  	_ = x[JWS-3]
    15  	_ = x[JWK-4]
    16  	_ = x[JWKS-5]
    17  	_ = x[JWT-6]
    18  }
    19  
    20  const _FormatKind_name = "InvalidFormatUnknownFormatJWEJWSJWKJWKSJWT"
    21  
    22  var _FormatKind_index = [...]uint8{0, 13, 26, 29, 32, 35, 39, 42}
    23  
    24  func (i FormatKind) String() string {
    25  	if i < 0 || i >= FormatKind(len(_FormatKind_index)-1) {
    26  		return "FormatKind(" + strconv.FormatInt(int64(i), 10) + ")"
    27  	}
    28  	return _FormatKind_name[_FormatKind_index[i]:_FormatKind_index[i+1]]
    29  }