github.com/nspcc-dev/neo-go@v0.105.2-0.20240517133400-6be757af3eba/pkg/core/native/noderoles/role_string.go (about) 1 // Code generated by "stringer -type=Role"; DO NOT EDIT. 2 3 package noderoles 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[StateValidator-4] 12 _ = x[Oracle-8] 13 _ = x[NeoFSAlphabet-16] 14 _ = x[P2PNotary-32] 15 _ = x[last-64] 16 } 17 18 const ( 19 _Role_name_0 = "StateValidator" 20 _Role_name_1 = "Oracle" 21 _Role_name_2 = "NeoFSAlphabet" 22 _Role_name_3 = "P2PNotary" 23 _Role_name_4 = "last" 24 ) 25 26 func (i Role) String() string { 27 switch { 28 case i == 4: 29 return _Role_name_0 30 case i == 8: 31 return _Role_name_1 32 case i == 16: 33 return _Role_name_2 34 case i == 32: 35 return _Role_name_3 36 case i == 64: 37 return _Role_name_4 38 default: 39 return "Role(" + strconv.FormatInt(int64(i), 10) + ")" 40 } 41 }