*: update Stringers wrt fresh Stringer version

Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
This commit is contained in:
Anna Shaleva 2023-10-18 23:21:47 +03:00
parent 61a74ab331
commit 1815bc8a32
4 changed files with 19 additions and 9 deletions

View file

@ -10,16 +10,26 @@ func _() {
var x [1]struct{} var x [1]struct{}
_ = x[HFAspidochelone-1] _ = x[HFAspidochelone-1]
_ = x[HFBasilisk-2] _ = x[HFBasilisk-2]
_ = x[hfLast-4]
} }
const _Hardfork_name = "AspidocheloneBasilisk" const (
_Hardfork_name_0 = "AspidocheloneBasilisk"
_Hardfork_name_1 = "hfLast"
)
var _Hardfork_index = [...]uint8{0, 13, 21} var (
_Hardfork_index_0 = [...]uint8{0, 13, 21}
)
func (i Hardfork) String() string { func (i Hardfork) String() string {
i -= 1 switch {
if i >= Hardfork(len(_Hardfork_index)-1) { case 1 <= i && i <= 2:
return "Hardfork(" + strconv.FormatInt(int64(i+1), 10) + ")" i -= 1
return _Hardfork_name_0[_Hardfork_index_0[i]:_Hardfork_index_0[i+1]]
case i == 4:
return _Hardfork_name_1
default:
return "Hardfork(" + strconv.FormatInt(int64(i), 10) + ")"
} }
return _Hardfork_name[_Hardfork_index[i]:_Hardfork_index[i+1]]
} }

View file

@ -30,7 +30,7 @@ var (
func (i WitnessScope) String() string { func (i WitnessScope) String() string {
switch { switch {
case 0 <= i && i <= 1: case i <= 1:
return _WitnessScope_name_0[_WitnessScope_index_0[i]:_WitnessScope_index_0[i+1]] return _WitnessScope_name_0[_WitnessScope_index_0[i]:_WitnessScope_index_0[i+1]]
case i == 16: case i == 16:
return _WitnessScope_name_1 return _WitnessScope_name_1

View file

@ -34,7 +34,7 @@ var (
func (i WitnessConditionType) String() string { func (i WitnessConditionType) String() string {
switch { switch {
case 0 <= i && i <= 3: case i <= 3:
return _WitnessConditionType_name_0[_WitnessConditionType_index_0[i]:_WitnessConditionType_index_0[i+1]] return _WitnessConditionType_name_0[_WitnessConditionType_index_0[i]:_WitnessConditionType_index_0[i+1]]
case 24 <= i && i <= 25: case 24 <= i && i <= 25:
i -= 24 i -= 24

View file

@ -62,7 +62,7 @@ var (
func (i CommandType) String() string { func (i CommandType) String() string {
switch { switch {
case 0 <= i && i <= 1: case i <= 1:
return _CommandType_name_0[_CommandType_index_0[i]:_CommandType_index_0[i+1]] return _CommandType_name_0[_CommandType_index_0[i]:_CommandType_index_0[i+1]]
case 16 <= i && i <= 17: case 16 <= i && i <= 17:
i -= 16 i -= 16