neoneo-go/pkg/core/transaction/witness_scope_string.go
Anna Shaleva 3568ab3d6d core: add json marshaller for Cosigner's scopes
Following C# implementation, we should marshal Scopes as a set of
strings instead of single byte.
2020-06-15 13:48:15 +03:00

38 lines
921 B
Go

// Code generated by "stringer -type=WitnessScope -output=witness_scope_string.go"; DO NOT EDIT.
package transaction
import "strconv"
func _() {
// An "invalid array index" compiler error signifies that the constant values have changed.
// Re-run the stringer command to generate them again.
var x [1]struct{}
_ = x[Global-0]
_ = x[CalledByEntry-1]
_ = x[CustomContracts-16]
_ = x[CustomGroups-32]
}
const (
_WitnessScope_name_0 = "GlobalCalledByEntry"
_WitnessScope_name_1 = "CustomContracts"
_WitnessScope_name_2 = "CustomGroups"
)
var (
_WitnessScope_index_0 = [...]uint8{0, 6, 19}
)
func (i WitnessScope) String() string {
switch {
case i <= 1:
return _WitnessScope_name_0[_WitnessScope_index_0[i]:_WitnessScope_index_0[i+1]]
case i == 16:
return _WitnessScope_name_1
case i == 32:
return _WitnessScope_name_2
default:
return "WitnessScope(" + strconv.FormatInt(int64(i), 10) + ")"
}
}