github.com/nspcc-dev/neo-go@v0.105.2-0.20240517133400-6be757af3eba/pkg/core/transaction/witness_scope_string.go (about) 1 // Code generated by "stringer -type=WitnessScope -linecomment -output=witness_scope_string.go"; DO NOT EDIT. 2 3 package transaction 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[None-0] 12 _ = x[CalledByEntry-1] 13 _ = x[CustomContracts-16] 14 _ = x[CustomGroups-32] 15 _ = x[Rules-64] 16 _ = x[Global-128] 17 } 18 19 const ( 20 _WitnessScope_name_0 = "NoneCalledByEntry" 21 _WitnessScope_name_1 = "CustomContracts" 22 _WitnessScope_name_2 = "CustomGroups" 23 _WitnessScope_name_3 = "WitnessRules" 24 _WitnessScope_name_4 = "Global" 25 ) 26 27 var ( 28 _WitnessScope_index_0 = [...]uint8{0, 4, 17} 29 ) 30 31 func (i WitnessScope) String() string { 32 switch { 33 case i <= 1: 34 return _WitnessScope_name_0[_WitnessScope_index_0[i]:_WitnessScope_index_0[i+1]] 35 case i == 16: 36 return _WitnessScope_name_1 37 case i == 32: 38 return _WitnessScope_name_2 39 case i == 64: 40 return _WitnessScope_name_3 41 case i == 128: 42 return _WitnessScope_name_4 43 default: 44 return "WitnessScope(" + strconv.FormatInt(int64(i), 10) + ")" 45 } 46 }