go-json/encode_optype.go

1187 lines
46 KiB
Go

// Code generated by cmd/generator. DO NOT EDIT!
package json
import (
"strings"
)
type codeType int
const (
codeOp codeType = 0
codeArrayHead codeType = 1
codeArrayElem codeType = 2
codeSliceHead codeType = 3
codeSliceElem codeType = 4
codeMapHead codeType = 5
codeMapKey codeType = 6
codeMapValue codeType = 7
codeMapEnd codeType = 8
codeStructFieldRecursive codeType = 9
codeStructField codeType = 10
codeStructEnd codeType = 11
)
var opTypeStrings = [440]string{
"End",
"Interface",
"Ptr",
"SliceElem",
"SliceEnd",
"ArrayElem",
"ArrayEnd",
"MapKey",
"MapValue",
"MapEnd",
"StructFieldRecursiveEnd",
"StructAnonymousEnd",
"Int",
"Uint",
"Float32",
"Float64",
"Bool",
"String",
"Bytes",
"Number",
"Array",
"Map",
"Slice",
"Struct",
"MarshalJSON",
"MarshalText",
"Recursive",
"IntString",
"UintString",
"IntPtr",
"UintPtr",
"Float32Ptr",
"Float64Ptr",
"BoolPtr",
"StringPtr",
"BytesPtr",
"NumberPtr",
"ArrayPtr",
"MapPtr",
"SlicePtr",
"MarshalJSONPtr",
"MarshalTextPtr",
"InterfacePtr",
"RecursivePtr",
"StructFieldHeadInt",
"StructFieldHeadOmitEmptyInt",
"StructFieldHeadStringTagInt",
"StructFieldPtrHeadInt",
"StructFieldPtrHeadOmitEmptyInt",
"StructFieldPtrHeadStringTagInt",
"StructFieldHeadUint",
"StructFieldHeadOmitEmptyUint",
"StructFieldHeadStringTagUint",
"StructFieldPtrHeadUint",
"StructFieldPtrHeadOmitEmptyUint",
"StructFieldPtrHeadStringTagUint",
"StructFieldHeadFloat32",
"StructFieldHeadOmitEmptyFloat32",
"StructFieldHeadStringTagFloat32",
"StructFieldPtrHeadFloat32",
"StructFieldPtrHeadOmitEmptyFloat32",
"StructFieldPtrHeadStringTagFloat32",
"StructFieldHeadFloat64",
"StructFieldHeadOmitEmptyFloat64",
"StructFieldHeadStringTagFloat64",
"StructFieldPtrHeadFloat64",
"StructFieldPtrHeadOmitEmptyFloat64",
"StructFieldPtrHeadStringTagFloat64",
"StructFieldHeadBool",
"StructFieldHeadOmitEmptyBool",
"StructFieldHeadStringTagBool",
"StructFieldPtrHeadBool",
"StructFieldPtrHeadOmitEmptyBool",
"StructFieldPtrHeadStringTagBool",
"StructFieldHeadString",
"StructFieldHeadOmitEmptyString",
"StructFieldHeadStringTagString",
"StructFieldPtrHeadString",
"StructFieldPtrHeadOmitEmptyString",
"StructFieldPtrHeadStringTagString",
"StructFieldHeadBytes",
"StructFieldHeadOmitEmptyBytes",
"StructFieldHeadStringTagBytes",
"StructFieldPtrHeadBytes",
"StructFieldPtrHeadOmitEmptyBytes",
"StructFieldPtrHeadStringTagBytes",
"StructFieldHeadNumber",
"StructFieldHeadOmitEmptyNumber",
"StructFieldHeadStringTagNumber",
"StructFieldPtrHeadNumber",
"StructFieldPtrHeadOmitEmptyNumber",
"StructFieldPtrHeadStringTagNumber",
"StructFieldHeadArray",
"StructFieldHeadOmitEmptyArray",
"StructFieldHeadStringTagArray",
"StructFieldPtrHeadArray",
"StructFieldPtrHeadOmitEmptyArray",
"StructFieldPtrHeadStringTagArray",
"StructFieldHeadMap",
"StructFieldHeadOmitEmptyMap",
"StructFieldHeadStringTagMap",
"StructFieldPtrHeadMap",
"StructFieldPtrHeadOmitEmptyMap",
"StructFieldPtrHeadStringTagMap",
"StructFieldHeadSlice",
"StructFieldHeadOmitEmptySlice",
"StructFieldHeadStringTagSlice",
"StructFieldPtrHeadSlice",
"StructFieldPtrHeadOmitEmptySlice",
"StructFieldPtrHeadStringTagSlice",
"StructFieldHeadStruct",
"StructFieldHeadOmitEmptyStruct",
"StructFieldHeadStringTagStruct",
"StructFieldPtrHeadStruct",
"StructFieldPtrHeadOmitEmptyStruct",
"StructFieldPtrHeadStringTagStruct",
"StructFieldHeadMarshalJSON",
"StructFieldHeadOmitEmptyMarshalJSON",
"StructFieldHeadStringTagMarshalJSON",
"StructFieldPtrHeadMarshalJSON",
"StructFieldPtrHeadOmitEmptyMarshalJSON",
"StructFieldPtrHeadStringTagMarshalJSON",
"StructFieldHeadMarshalText",
"StructFieldHeadOmitEmptyMarshalText",
"StructFieldHeadStringTagMarshalText",
"StructFieldPtrHeadMarshalText",
"StructFieldPtrHeadOmitEmptyMarshalText",
"StructFieldPtrHeadStringTagMarshalText",
"StructFieldHeadRecursive",
"StructFieldHeadOmitEmptyRecursive",
"StructFieldHeadStringTagRecursive",
"StructFieldPtrHeadRecursive",
"StructFieldPtrHeadOmitEmptyRecursive",
"StructFieldPtrHeadStringTagRecursive",
"StructFieldHeadIntString",
"StructFieldHeadOmitEmptyIntString",
"StructFieldHeadStringTagIntString",
"StructFieldPtrHeadIntString",
"StructFieldPtrHeadOmitEmptyIntString",
"StructFieldPtrHeadStringTagIntString",
"StructFieldHeadUintString",
"StructFieldHeadOmitEmptyUintString",
"StructFieldHeadStringTagUintString",
"StructFieldPtrHeadUintString",
"StructFieldPtrHeadOmitEmptyUintString",
"StructFieldPtrHeadStringTagUintString",
"StructFieldHeadIntPtr",
"StructFieldHeadOmitEmptyIntPtr",
"StructFieldHeadStringTagIntPtr",
"StructFieldPtrHeadIntPtr",
"StructFieldPtrHeadOmitEmptyIntPtr",
"StructFieldPtrHeadStringTagIntPtr",
"StructFieldHeadUintPtr",
"StructFieldHeadOmitEmptyUintPtr",
"StructFieldHeadStringTagUintPtr",
"StructFieldPtrHeadUintPtr",
"StructFieldPtrHeadOmitEmptyUintPtr",
"StructFieldPtrHeadStringTagUintPtr",
"StructFieldHeadFloat32Ptr",
"StructFieldHeadOmitEmptyFloat32Ptr",
"StructFieldHeadStringTagFloat32Ptr",
"StructFieldPtrHeadFloat32Ptr",
"StructFieldPtrHeadOmitEmptyFloat32Ptr",
"StructFieldPtrHeadStringTagFloat32Ptr",
"StructFieldHeadFloat64Ptr",
"StructFieldHeadOmitEmptyFloat64Ptr",
"StructFieldHeadStringTagFloat64Ptr",
"StructFieldPtrHeadFloat64Ptr",
"StructFieldPtrHeadOmitEmptyFloat64Ptr",
"StructFieldPtrHeadStringTagFloat64Ptr",
"StructFieldHeadBoolPtr",
"StructFieldHeadOmitEmptyBoolPtr",
"StructFieldHeadStringTagBoolPtr",
"StructFieldPtrHeadBoolPtr",
"StructFieldPtrHeadOmitEmptyBoolPtr",
"StructFieldPtrHeadStringTagBoolPtr",
"StructFieldHeadStringPtr",
"StructFieldHeadOmitEmptyStringPtr",
"StructFieldHeadStringTagStringPtr",
"StructFieldPtrHeadStringPtr",
"StructFieldPtrHeadOmitEmptyStringPtr",
"StructFieldPtrHeadStringTagStringPtr",
"StructFieldHeadBytesPtr",
"StructFieldHeadOmitEmptyBytesPtr",
"StructFieldHeadStringTagBytesPtr",
"StructFieldPtrHeadBytesPtr",
"StructFieldPtrHeadOmitEmptyBytesPtr",
"StructFieldPtrHeadStringTagBytesPtr",
"StructFieldHeadNumberPtr",
"StructFieldHeadOmitEmptyNumberPtr",
"StructFieldHeadStringTagNumberPtr",
"StructFieldPtrHeadNumberPtr",
"StructFieldPtrHeadOmitEmptyNumberPtr",
"StructFieldPtrHeadStringTagNumberPtr",
"StructFieldHeadArrayPtr",
"StructFieldHeadOmitEmptyArrayPtr",
"StructFieldHeadStringTagArrayPtr",
"StructFieldPtrHeadArrayPtr",
"StructFieldPtrHeadOmitEmptyArrayPtr",
"StructFieldPtrHeadStringTagArrayPtr",
"StructFieldHeadMapPtr",
"StructFieldHeadOmitEmptyMapPtr",
"StructFieldHeadStringTagMapPtr",
"StructFieldPtrHeadMapPtr",
"StructFieldPtrHeadOmitEmptyMapPtr",
"StructFieldPtrHeadStringTagMapPtr",
"StructFieldHeadSlicePtr",
"StructFieldHeadOmitEmptySlicePtr",
"StructFieldHeadStringTagSlicePtr",
"StructFieldPtrHeadSlicePtr",
"StructFieldPtrHeadOmitEmptySlicePtr",
"StructFieldPtrHeadStringTagSlicePtr",
"StructFieldHeadMarshalJSONPtr",
"StructFieldHeadOmitEmptyMarshalJSONPtr",
"StructFieldHeadStringTagMarshalJSONPtr",
"StructFieldPtrHeadMarshalJSONPtr",
"StructFieldPtrHeadOmitEmptyMarshalJSONPtr",
"StructFieldPtrHeadStringTagMarshalJSONPtr",
"StructFieldHeadMarshalTextPtr",
"StructFieldHeadOmitEmptyMarshalTextPtr",
"StructFieldHeadStringTagMarshalTextPtr",
"StructFieldPtrHeadMarshalTextPtr",
"StructFieldPtrHeadOmitEmptyMarshalTextPtr",
"StructFieldPtrHeadStringTagMarshalTextPtr",
"StructFieldHeadInterfacePtr",
"StructFieldHeadOmitEmptyInterfacePtr",
"StructFieldHeadStringTagInterfacePtr",
"StructFieldPtrHeadInterfacePtr",
"StructFieldPtrHeadOmitEmptyInterfacePtr",
"StructFieldPtrHeadStringTagInterfacePtr",
"StructFieldHeadRecursivePtr",
"StructFieldHeadOmitEmptyRecursivePtr",
"StructFieldHeadStringTagRecursivePtr",
"StructFieldPtrHeadRecursivePtr",
"StructFieldPtrHeadOmitEmptyRecursivePtr",
"StructFieldPtrHeadStringTagRecursivePtr",
"StructFieldHead",
"StructFieldHeadOmitEmpty",
"StructFieldHeadStringTag",
"StructFieldPtrHead",
"StructFieldPtrHeadOmitEmpty",
"StructFieldPtrHeadStringTag",
"StructFieldInt",
"StructFieldOmitEmptyInt",
"StructFieldStringTagInt",
"StructFieldUint",
"StructFieldOmitEmptyUint",
"StructFieldStringTagUint",
"StructFieldFloat32",
"StructFieldOmitEmptyFloat32",
"StructFieldStringTagFloat32",
"StructFieldFloat64",
"StructFieldOmitEmptyFloat64",
"StructFieldStringTagFloat64",
"StructFieldBool",
"StructFieldOmitEmptyBool",
"StructFieldStringTagBool",
"StructFieldString",
"StructFieldOmitEmptyString",
"StructFieldStringTagString",
"StructFieldBytes",
"StructFieldOmitEmptyBytes",
"StructFieldStringTagBytes",
"StructFieldNumber",
"StructFieldOmitEmptyNumber",
"StructFieldStringTagNumber",
"StructFieldArray",
"StructFieldOmitEmptyArray",
"StructFieldStringTagArray",
"StructFieldMap",
"StructFieldOmitEmptyMap",
"StructFieldStringTagMap",
"StructFieldSlice",
"StructFieldOmitEmptySlice",
"StructFieldStringTagSlice",
"StructFieldStruct",
"StructFieldOmitEmptyStruct",
"StructFieldStringTagStruct",
"StructFieldMarshalJSON",
"StructFieldOmitEmptyMarshalJSON",
"StructFieldStringTagMarshalJSON",
"StructFieldMarshalText",
"StructFieldOmitEmptyMarshalText",
"StructFieldStringTagMarshalText",
"StructFieldRecursive",
"StructFieldOmitEmptyRecursive",
"StructFieldStringTagRecursive",
"StructFieldIntString",
"StructFieldOmitEmptyIntString",
"StructFieldStringTagIntString",
"StructFieldUintString",
"StructFieldOmitEmptyUintString",
"StructFieldStringTagUintString",
"StructFieldIntPtr",
"StructFieldOmitEmptyIntPtr",
"StructFieldStringTagIntPtr",
"StructFieldUintPtr",
"StructFieldOmitEmptyUintPtr",
"StructFieldStringTagUintPtr",
"StructFieldFloat32Ptr",
"StructFieldOmitEmptyFloat32Ptr",
"StructFieldStringTagFloat32Ptr",
"StructFieldFloat64Ptr",
"StructFieldOmitEmptyFloat64Ptr",
"StructFieldStringTagFloat64Ptr",
"StructFieldBoolPtr",
"StructFieldOmitEmptyBoolPtr",
"StructFieldStringTagBoolPtr",
"StructFieldStringPtr",
"StructFieldOmitEmptyStringPtr",
"StructFieldStringTagStringPtr",
"StructFieldBytesPtr",
"StructFieldOmitEmptyBytesPtr",
"StructFieldStringTagBytesPtr",
"StructFieldNumberPtr",
"StructFieldOmitEmptyNumberPtr",
"StructFieldStringTagNumberPtr",
"StructFieldArrayPtr",
"StructFieldOmitEmptyArrayPtr",
"StructFieldStringTagArrayPtr",
"StructFieldMapPtr",
"StructFieldOmitEmptyMapPtr",
"StructFieldStringTagMapPtr",
"StructFieldSlicePtr",
"StructFieldOmitEmptySlicePtr",
"StructFieldStringTagSlicePtr",
"StructFieldMarshalJSONPtr",
"StructFieldOmitEmptyMarshalJSONPtr",
"StructFieldStringTagMarshalJSONPtr",
"StructFieldMarshalTextPtr",
"StructFieldOmitEmptyMarshalTextPtr",
"StructFieldStringTagMarshalTextPtr",
"StructFieldInterfacePtr",
"StructFieldOmitEmptyInterfacePtr",
"StructFieldStringTagInterfacePtr",
"StructFieldRecursivePtr",
"StructFieldOmitEmptyRecursivePtr",
"StructFieldStringTagRecursivePtr",
"StructField",
"StructFieldOmitEmpty",
"StructFieldStringTag",
"StructEndInt",
"StructEndOmitEmptyInt",
"StructEndStringTagInt",
"StructEndUint",
"StructEndOmitEmptyUint",
"StructEndStringTagUint",
"StructEndFloat32",
"StructEndOmitEmptyFloat32",
"StructEndStringTagFloat32",
"StructEndFloat64",
"StructEndOmitEmptyFloat64",
"StructEndStringTagFloat64",
"StructEndBool",
"StructEndOmitEmptyBool",
"StructEndStringTagBool",
"StructEndString",
"StructEndOmitEmptyString",
"StructEndStringTagString",
"StructEndBytes",
"StructEndOmitEmptyBytes",
"StructEndStringTagBytes",
"StructEndNumber",
"StructEndOmitEmptyNumber",
"StructEndStringTagNumber",
"StructEndArray",
"StructEndOmitEmptyArray",
"StructEndStringTagArray",
"StructEndMap",
"StructEndOmitEmptyMap",
"StructEndStringTagMap",
"StructEndSlice",
"StructEndOmitEmptySlice",
"StructEndStringTagSlice",
"StructEndStruct",
"StructEndOmitEmptyStruct",
"StructEndStringTagStruct",
"StructEndMarshalJSON",
"StructEndOmitEmptyMarshalJSON",
"StructEndStringTagMarshalJSON",
"StructEndMarshalText",
"StructEndOmitEmptyMarshalText",
"StructEndStringTagMarshalText",
"StructEndRecursive",
"StructEndOmitEmptyRecursive",
"StructEndStringTagRecursive",
"StructEndIntString",
"StructEndOmitEmptyIntString",
"StructEndStringTagIntString",
"StructEndUintString",
"StructEndOmitEmptyUintString",
"StructEndStringTagUintString",
"StructEndIntPtr",
"StructEndOmitEmptyIntPtr",
"StructEndStringTagIntPtr",
"StructEndUintPtr",
"StructEndOmitEmptyUintPtr",
"StructEndStringTagUintPtr",
"StructEndFloat32Ptr",
"StructEndOmitEmptyFloat32Ptr",
"StructEndStringTagFloat32Ptr",
"StructEndFloat64Ptr",
"StructEndOmitEmptyFloat64Ptr",
"StructEndStringTagFloat64Ptr",
"StructEndBoolPtr",
"StructEndOmitEmptyBoolPtr",
"StructEndStringTagBoolPtr",
"StructEndStringPtr",
"StructEndOmitEmptyStringPtr",
"StructEndStringTagStringPtr",
"StructEndBytesPtr",
"StructEndOmitEmptyBytesPtr",
"StructEndStringTagBytesPtr",
"StructEndNumberPtr",
"StructEndOmitEmptyNumberPtr",
"StructEndStringTagNumberPtr",
"StructEndArrayPtr",
"StructEndOmitEmptyArrayPtr",
"StructEndStringTagArrayPtr",
"StructEndMapPtr",
"StructEndOmitEmptyMapPtr",
"StructEndStringTagMapPtr",
"StructEndSlicePtr",
"StructEndOmitEmptySlicePtr",
"StructEndStringTagSlicePtr",
"StructEndMarshalJSONPtr",
"StructEndOmitEmptyMarshalJSONPtr",
"StructEndStringTagMarshalJSONPtr",
"StructEndMarshalTextPtr",
"StructEndOmitEmptyMarshalTextPtr",
"StructEndStringTagMarshalTextPtr",
"StructEndInterfacePtr",
"StructEndOmitEmptyInterfacePtr",
"StructEndStringTagInterfacePtr",
"StructEndRecursivePtr",
"StructEndOmitEmptyRecursivePtr",
"StructEndStringTagRecursivePtr",
"StructEnd",
"StructEndOmitEmpty",
"StructEndStringTag",
}
type opType int
const (
opEnd opType = 0
opInterface opType = 1
opPtr opType = 2
opSliceElem opType = 3
opSliceEnd opType = 4
opArrayElem opType = 5
opArrayEnd opType = 6
opMapKey opType = 7
opMapValue opType = 8
opMapEnd opType = 9
opStructFieldRecursiveEnd opType = 10
opStructAnonymousEnd opType = 11
opInt opType = 12
opUint opType = 13
opFloat32 opType = 14
opFloat64 opType = 15
opBool opType = 16
opString opType = 17
opBytes opType = 18
opNumber opType = 19
opArray opType = 20
opMap opType = 21
opSlice opType = 22
opStruct opType = 23
opMarshalJSON opType = 24
opMarshalText opType = 25
opRecursive opType = 26
opIntString opType = 27
opUintString opType = 28
opIntPtr opType = 29
opUintPtr opType = 30
opFloat32Ptr opType = 31
opFloat64Ptr opType = 32
opBoolPtr opType = 33
opStringPtr opType = 34
opBytesPtr opType = 35
opNumberPtr opType = 36
opArrayPtr opType = 37
opMapPtr opType = 38
opSlicePtr opType = 39
opMarshalJSONPtr opType = 40
opMarshalTextPtr opType = 41
opInterfacePtr opType = 42
opRecursivePtr opType = 43
opStructFieldHeadInt opType = 44
opStructFieldHeadOmitEmptyInt opType = 45
opStructFieldHeadStringTagInt opType = 46
opStructFieldPtrHeadInt opType = 47
opStructFieldPtrHeadOmitEmptyInt opType = 48
opStructFieldPtrHeadStringTagInt opType = 49
opStructFieldHeadUint opType = 50
opStructFieldHeadOmitEmptyUint opType = 51
opStructFieldHeadStringTagUint opType = 52
opStructFieldPtrHeadUint opType = 53
opStructFieldPtrHeadOmitEmptyUint opType = 54
opStructFieldPtrHeadStringTagUint opType = 55
opStructFieldHeadFloat32 opType = 56
opStructFieldHeadOmitEmptyFloat32 opType = 57
opStructFieldHeadStringTagFloat32 opType = 58
opStructFieldPtrHeadFloat32 opType = 59
opStructFieldPtrHeadOmitEmptyFloat32 opType = 60
opStructFieldPtrHeadStringTagFloat32 opType = 61
opStructFieldHeadFloat64 opType = 62
opStructFieldHeadOmitEmptyFloat64 opType = 63
opStructFieldHeadStringTagFloat64 opType = 64
opStructFieldPtrHeadFloat64 opType = 65
opStructFieldPtrHeadOmitEmptyFloat64 opType = 66
opStructFieldPtrHeadStringTagFloat64 opType = 67
opStructFieldHeadBool opType = 68
opStructFieldHeadOmitEmptyBool opType = 69
opStructFieldHeadStringTagBool opType = 70
opStructFieldPtrHeadBool opType = 71
opStructFieldPtrHeadOmitEmptyBool opType = 72
opStructFieldPtrHeadStringTagBool opType = 73
opStructFieldHeadString opType = 74
opStructFieldHeadOmitEmptyString opType = 75
opStructFieldHeadStringTagString opType = 76
opStructFieldPtrHeadString opType = 77
opStructFieldPtrHeadOmitEmptyString opType = 78
opStructFieldPtrHeadStringTagString opType = 79
opStructFieldHeadBytes opType = 80
opStructFieldHeadOmitEmptyBytes opType = 81
opStructFieldHeadStringTagBytes opType = 82
opStructFieldPtrHeadBytes opType = 83
opStructFieldPtrHeadOmitEmptyBytes opType = 84
opStructFieldPtrHeadStringTagBytes opType = 85
opStructFieldHeadNumber opType = 86
opStructFieldHeadOmitEmptyNumber opType = 87
opStructFieldHeadStringTagNumber opType = 88
opStructFieldPtrHeadNumber opType = 89
opStructFieldPtrHeadOmitEmptyNumber opType = 90
opStructFieldPtrHeadStringTagNumber opType = 91
opStructFieldHeadArray opType = 92
opStructFieldHeadOmitEmptyArray opType = 93
opStructFieldHeadStringTagArray opType = 94
opStructFieldPtrHeadArray opType = 95
opStructFieldPtrHeadOmitEmptyArray opType = 96
opStructFieldPtrHeadStringTagArray opType = 97
opStructFieldHeadMap opType = 98
opStructFieldHeadOmitEmptyMap opType = 99
opStructFieldHeadStringTagMap opType = 100
opStructFieldPtrHeadMap opType = 101
opStructFieldPtrHeadOmitEmptyMap opType = 102
opStructFieldPtrHeadStringTagMap opType = 103
opStructFieldHeadSlice opType = 104
opStructFieldHeadOmitEmptySlice opType = 105
opStructFieldHeadStringTagSlice opType = 106
opStructFieldPtrHeadSlice opType = 107
opStructFieldPtrHeadOmitEmptySlice opType = 108
opStructFieldPtrHeadStringTagSlice opType = 109
opStructFieldHeadStruct opType = 110
opStructFieldHeadOmitEmptyStruct opType = 111
opStructFieldHeadStringTagStruct opType = 112
opStructFieldPtrHeadStruct opType = 113
opStructFieldPtrHeadOmitEmptyStruct opType = 114
opStructFieldPtrHeadStringTagStruct opType = 115
opStructFieldHeadMarshalJSON opType = 116
opStructFieldHeadOmitEmptyMarshalJSON opType = 117
opStructFieldHeadStringTagMarshalJSON opType = 118
opStructFieldPtrHeadMarshalJSON opType = 119
opStructFieldPtrHeadOmitEmptyMarshalJSON opType = 120
opStructFieldPtrHeadStringTagMarshalJSON opType = 121
opStructFieldHeadMarshalText opType = 122
opStructFieldHeadOmitEmptyMarshalText opType = 123
opStructFieldHeadStringTagMarshalText opType = 124
opStructFieldPtrHeadMarshalText opType = 125
opStructFieldPtrHeadOmitEmptyMarshalText opType = 126
opStructFieldPtrHeadStringTagMarshalText opType = 127
opStructFieldHeadRecursive opType = 128
opStructFieldHeadOmitEmptyRecursive opType = 129
opStructFieldHeadStringTagRecursive opType = 130
opStructFieldPtrHeadRecursive opType = 131
opStructFieldPtrHeadOmitEmptyRecursive opType = 132
opStructFieldPtrHeadStringTagRecursive opType = 133
opStructFieldHeadIntString opType = 134
opStructFieldHeadOmitEmptyIntString opType = 135
opStructFieldHeadStringTagIntString opType = 136
opStructFieldPtrHeadIntString opType = 137
opStructFieldPtrHeadOmitEmptyIntString opType = 138
opStructFieldPtrHeadStringTagIntString opType = 139
opStructFieldHeadUintString opType = 140
opStructFieldHeadOmitEmptyUintString opType = 141
opStructFieldHeadStringTagUintString opType = 142
opStructFieldPtrHeadUintString opType = 143
opStructFieldPtrHeadOmitEmptyUintString opType = 144
opStructFieldPtrHeadStringTagUintString opType = 145
opStructFieldHeadIntPtr opType = 146
opStructFieldHeadOmitEmptyIntPtr opType = 147
opStructFieldHeadStringTagIntPtr opType = 148
opStructFieldPtrHeadIntPtr opType = 149
opStructFieldPtrHeadOmitEmptyIntPtr opType = 150
opStructFieldPtrHeadStringTagIntPtr opType = 151
opStructFieldHeadUintPtr opType = 152
opStructFieldHeadOmitEmptyUintPtr opType = 153
opStructFieldHeadStringTagUintPtr opType = 154
opStructFieldPtrHeadUintPtr opType = 155
opStructFieldPtrHeadOmitEmptyUintPtr opType = 156
opStructFieldPtrHeadStringTagUintPtr opType = 157
opStructFieldHeadFloat32Ptr opType = 158
opStructFieldHeadOmitEmptyFloat32Ptr opType = 159
opStructFieldHeadStringTagFloat32Ptr opType = 160
opStructFieldPtrHeadFloat32Ptr opType = 161
opStructFieldPtrHeadOmitEmptyFloat32Ptr opType = 162
opStructFieldPtrHeadStringTagFloat32Ptr opType = 163
opStructFieldHeadFloat64Ptr opType = 164
opStructFieldHeadOmitEmptyFloat64Ptr opType = 165
opStructFieldHeadStringTagFloat64Ptr opType = 166
opStructFieldPtrHeadFloat64Ptr opType = 167
opStructFieldPtrHeadOmitEmptyFloat64Ptr opType = 168
opStructFieldPtrHeadStringTagFloat64Ptr opType = 169
opStructFieldHeadBoolPtr opType = 170
opStructFieldHeadOmitEmptyBoolPtr opType = 171
opStructFieldHeadStringTagBoolPtr opType = 172
opStructFieldPtrHeadBoolPtr opType = 173
opStructFieldPtrHeadOmitEmptyBoolPtr opType = 174
opStructFieldPtrHeadStringTagBoolPtr opType = 175
opStructFieldHeadStringPtr opType = 176
opStructFieldHeadOmitEmptyStringPtr opType = 177
opStructFieldHeadStringTagStringPtr opType = 178
opStructFieldPtrHeadStringPtr opType = 179
opStructFieldPtrHeadOmitEmptyStringPtr opType = 180
opStructFieldPtrHeadStringTagStringPtr opType = 181
opStructFieldHeadBytesPtr opType = 182
opStructFieldHeadOmitEmptyBytesPtr opType = 183
opStructFieldHeadStringTagBytesPtr opType = 184
opStructFieldPtrHeadBytesPtr opType = 185
opStructFieldPtrHeadOmitEmptyBytesPtr opType = 186
opStructFieldPtrHeadStringTagBytesPtr opType = 187
opStructFieldHeadNumberPtr opType = 188
opStructFieldHeadOmitEmptyNumberPtr opType = 189
opStructFieldHeadStringTagNumberPtr opType = 190
opStructFieldPtrHeadNumberPtr opType = 191
opStructFieldPtrHeadOmitEmptyNumberPtr opType = 192
opStructFieldPtrHeadStringTagNumberPtr opType = 193
opStructFieldHeadArrayPtr opType = 194
opStructFieldHeadOmitEmptyArrayPtr opType = 195
opStructFieldHeadStringTagArrayPtr opType = 196
opStructFieldPtrHeadArrayPtr opType = 197
opStructFieldPtrHeadOmitEmptyArrayPtr opType = 198
opStructFieldPtrHeadStringTagArrayPtr opType = 199
opStructFieldHeadMapPtr opType = 200
opStructFieldHeadOmitEmptyMapPtr opType = 201
opStructFieldHeadStringTagMapPtr opType = 202
opStructFieldPtrHeadMapPtr opType = 203
opStructFieldPtrHeadOmitEmptyMapPtr opType = 204
opStructFieldPtrHeadStringTagMapPtr opType = 205
opStructFieldHeadSlicePtr opType = 206
opStructFieldHeadOmitEmptySlicePtr opType = 207
opStructFieldHeadStringTagSlicePtr opType = 208
opStructFieldPtrHeadSlicePtr opType = 209
opStructFieldPtrHeadOmitEmptySlicePtr opType = 210
opStructFieldPtrHeadStringTagSlicePtr opType = 211
opStructFieldHeadMarshalJSONPtr opType = 212
opStructFieldHeadOmitEmptyMarshalJSONPtr opType = 213
opStructFieldHeadStringTagMarshalJSONPtr opType = 214
opStructFieldPtrHeadMarshalJSONPtr opType = 215
opStructFieldPtrHeadOmitEmptyMarshalJSONPtr opType = 216
opStructFieldPtrHeadStringTagMarshalJSONPtr opType = 217
opStructFieldHeadMarshalTextPtr opType = 218
opStructFieldHeadOmitEmptyMarshalTextPtr opType = 219
opStructFieldHeadStringTagMarshalTextPtr opType = 220
opStructFieldPtrHeadMarshalTextPtr opType = 221
opStructFieldPtrHeadOmitEmptyMarshalTextPtr opType = 222
opStructFieldPtrHeadStringTagMarshalTextPtr opType = 223
opStructFieldHeadInterfacePtr opType = 224
opStructFieldHeadOmitEmptyInterfacePtr opType = 225
opStructFieldHeadStringTagInterfacePtr opType = 226
opStructFieldPtrHeadInterfacePtr opType = 227
opStructFieldPtrHeadOmitEmptyInterfacePtr opType = 228
opStructFieldPtrHeadStringTagInterfacePtr opType = 229
opStructFieldHeadRecursivePtr opType = 230
opStructFieldHeadOmitEmptyRecursivePtr opType = 231
opStructFieldHeadStringTagRecursivePtr opType = 232
opStructFieldPtrHeadRecursivePtr opType = 233
opStructFieldPtrHeadOmitEmptyRecursivePtr opType = 234
opStructFieldPtrHeadStringTagRecursivePtr opType = 235
opStructFieldHead opType = 236
opStructFieldHeadOmitEmpty opType = 237
opStructFieldHeadStringTag opType = 238
opStructFieldPtrHead opType = 239
opStructFieldPtrHeadOmitEmpty opType = 240
opStructFieldPtrHeadStringTag opType = 241
opStructFieldInt opType = 242
opStructFieldOmitEmptyInt opType = 243
opStructFieldStringTagInt opType = 244
opStructFieldUint opType = 245
opStructFieldOmitEmptyUint opType = 246
opStructFieldStringTagUint opType = 247
opStructFieldFloat32 opType = 248
opStructFieldOmitEmptyFloat32 opType = 249
opStructFieldStringTagFloat32 opType = 250
opStructFieldFloat64 opType = 251
opStructFieldOmitEmptyFloat64 opType = 252
opStructFieldStringTagFloat64 opType = 253
opStructFieldBool opType = 254
opStructFieldOmitEmptyBool opType = 255
opStructFieldStringTagBool opType = 256
opStructFieldString opType = 257
opStructFieldOmitEmptyString opType = 258
opStructFieldStringTagString opType = 259
opStructFieldBytes opType = 260
opStructFieldOmitEmptyBytes opType = 261
opStructFieldStringTagBytes opType = 262
opStructFieldNumber opType = 263
opStructFieldOmitEmptyNumber opType = 264
opStructFieldStringTagNumber opType = 265
opStructFieldArray opType = 266
opStructFieldOmitEmptyArray opType = 267
opStructFieldStringTagArray opType = 268
opStructFieldMap opType = 269
opStructFieldOmitEmptyMap opType = 270
opStructFieldStringTagMap opType = 271
opStructFieldSlice opType = 272
opStructFieldOmitEmptySlice opType = 273
opStructFieldStringTagSlice opType = 274
opStructFieldStruct opType = 275
opStructFieldOmitEmptyStruct opType = 276
opStructFieldStringTagStruct opType = 277
opStructFieldMarshalJSON opType = 278
opStructFieldOmitEmptyMarshalJSON opType = 279
opStructFieldStringTagMarshalJSON opType = 280
opStructFieldMarshalText opType = 281
opStructFieldOmitEmptyMarshalText opType = 282
opStructFieldStringTagMarshalText opType = 283
opStructFieldRecursive opType = 284
opStructFieldOmitEmptyRecursive opType = 285
opStructFieldStringTagRecursive opType = 286
opStructFieldIntString opType = 287
opStructFieldOmitEmptyIntString opType = 288
opStructFieldStringTagIntString opType = 289
opStructFieldUintString opType = 290
opStructFieldOmitEmptyUintString opType = 291
opStructFieldStringTagUintString opType = 292
opStructFieldIntPtr opType = 293
opStructFieldOmitEmptyIntPtr opType = 294
opStructFieldStringTagIntPtr opType = 295
opStructFieldUintPtr opType = 296
opStructFieldOmitEmptyUintPtr opType = 297
opStructFieldStringTagUintPtr opType = 298
opStructFieldFloat32Ptr opType = 299
opStructFieldOmitEmptyFloat32Ptr opType = 300
opStructFieldStringTagFloat32Ptr opType = 301
opStructFieldFloat64Ptr opType = 302
opStructFieldOmitEmptyFloat64Ptr opType = 303
opStructFieldStringTagFloat64Ptr opType = 304
opStructFieldBoolPtr opType = 305
opStructFieldOmitEmptyBoolPtr opType = 306
opStructFieldStringTagBoolPtr opType = 307
opStructFieldStringPtr opType = 308
opStructFieldOmitEmptyStringPtr opType = 309
opStructFieldStringTagStringPtr opType = 310
opStructFieldBytesPtr opType = 311
opStructFieldOmitEmptyBytesPtr opType = 312
opStructFieldStringTagBytesPtr opType = 313
opStructFieldNumberPtr opType = 314
opStructFieldOmitEmptyNumberPtr opType = 315
opStructFieldStringTagNumberPtr opType = 316
opStructFieldArrayPtr opType = 317
opStructFieldOmitEmptyArrayPtr opType = 318
opStructFieldStringTagArrayPtr opType = 319
opStructFieldMapPtr opType = 320
opStructFieldOmitEmptyMapPtr opType = 321
opStructFieldStringTagMapPtr opType = 322
opStructFieldSlicePtr opType = 323
opStructFieldOmitEmptySlicePtr opType = 324
opStructFieldStringTagSlicePtr opType = 325
opStructFieldMarshalJSONPtr opType = 326
opStructFieldOmitEmptyMarshalJSONPtr opType = 327
opStructFieldStringTagMarshalJSONPtr opType = 328
opStructFieldMarshalTextPtr opType = 329
opStructFieldOmitEmptyMarshalTextPtr opType = 330
opStructFieldStringTagMarshalTextPtr opType = 331
opStructFieldInterfacePtr opType = 332
opStructFieldOmitEmptyInterfacePtr opType = 333
opStructFieldStringTagInterfacePtr opType = 334
opStructFieldRecursivePtr opType = 335
opStructFieldOmitEmptyRecursivePtr opType = 336
opStructFieldStringTagRecursivePtr opType = 337
opStructField opType = 338
opStructFieldOmitEmpty opType = 339
opStructFieldStringTag opType = 340
opStructEndInt opType = 341
opStructEndOmitEmptyInt opType = 342
opStructEndStringTagInt opType = 343
opStructEndUint opType = 344
opStructEndOmitEmptyUint opType = 345
opStructEndStringTagUint opType = 346
opStructEndFloat32 opType = 347
opStructEndOmitEmptyFloat32 opType = 348
opStructEndStringTagFloat32 opType = 349
opStructEndFloat64 opType = 350
opStructEndOmitEmptyFloat64 opType = 351
opStructEndStringTagFloat64 opType = 352
opStructEndBool opType = 353
opStructEndOmitEmptyBool opType = 354
opStructEndStringTagBool opType = 355
opStructEndString opType = 356
opStructEndOmitEmptyString opType = 357
opStructEndStringTagString opType = 358
opStructEndBytes opType = 359
opStructEndOmitEmptyBytes opType = 360
opStructEndStringTagBytes opType = 361
opStructEndNumber opType = 362
opStructEndOmitEmptyNumber opType = 363
opStructEndStringTagNumber opType = 364
opStructEndArray opType = 365
opStructEndOmitEmptyArray opType = 366
opStructEndStringTagArray opType = 367
opStructEndMap opType = 368
opStructEndOmitEmptyMap opType = 369
opStructEndStringTagMap opType = 370
opStructEndSlice opType = 371
opStructEndOmitEmptySlice opType = 372
opStructEndStringTagSlice opType = 373
opStructEndStruct opType = 374
opStructEndOmitEmptyStruct opType = 375
opStructEndStringTagStruct opType = 376
opStructEndMarshalJSON opType = 377
opStructEndOmitEmptyMarshalJSON opType = 378
opStructEndStringTagMarshalJSON opType = 379
opStructEndMarshalText opType = 380
opStructEndOmitEmptyMarshalText opType = 381
opStructEndStringTagMarshalText opType = 382
opStructEndRecursive opType = 383
opStructEndOmitEmptyRecursive opType = 384
opStructEndStringTagRecursive opType = 385
opStructEndIntString opType = 386
opStructEndOmitEmptyIntString opType = 387
opStructEndStringTagIntString opType = 388
opStructEndUintString opType = 389
opStructEndOmitEmptyUintString opType = 390
opStructEndStringTagUintString opType = 391
opStructEndIntPtr opType = 392
opStructEndOmitEmptyIntPtr opType = 393
opStructEndStringTagIntPtr opType = 394
opStructEndUintPtr opType = 395
opStructEndOmitEmptyUintPtr opType = 396
opStructEndStringTagUintPtr opType = 397
opStructEndFloat32Ptr opType = 398
opStructEndOmitEmptyFloat32Ptr opType = 399
opStructEndStringTagFloat32Ptr opType = 400
opStructEndFloat64Ptr opType = 401
opStructEndOmitEmptyFloat64Ptr opType = 402
opStructEndStringTagFloat64Ptr opType = 403
opStructEndBoolPtr opType = 404
opStructEndOmitEmptyBoolPtr opType = 405
opStructEndStringTagBoolPtr opType = 406
opStructEndStringPtr opType = 407
opStructEndOmitEmptyStringPtr opType = 408
opStructEndStringTagStringPtr opType = 409
opStructEndBytesPtr opType = 410
opStructEndOmitEmptyBytesPtr opType = 411
opStructEndStringTagBytesPtr opType = 412
opStructEndNumberPtr opType = 413
opStructEndOmitEmptyNumberPtr opType = 414
opStructEndStringTagNumberPtr opType = 415
opStructEndArrayPtr opType = 416
opStructEndOmitEmptyArrayPtr opType = 417
opStructEndStringTagArrayPtr opType = 418
opStructEndMapPtr opType = 419
opStructEndOmitEmptyMapPtr opType = 420
opStructEndStringTagMapPtr opType = 421
opStructEndSlicePtr opType = 422
opStructEndOmitEmptySlicePtr opType = 423
opStructEndStringTagSlicePtr opType = 424
opStructEndMarshalJSONPtr opType = 425
opStructEndOmitEmptyMarshalJSONPtr opType = 426
opStructEndStringTagMarshalJSONPtr opType = 427
opStructEndMarshalTextPtr opType = 428
opStructEndOmitEmptyMarshalTextPtr opType = 429
opStructEndStringTagMarshalTextPtr opType = 430
opStructEndInterfacePtr opType = 431
opStructEndOmitEmptyInterfacePtr opType = 432
opStructEndStringTagInterfacePtr opType = 433
opStructEndRecursivePtr opType = 434
opStructEndOmitEmptyRecursivePtr opType = 435
opStructEndStringTagRecursivePtr opType = 436
opStructEnd opType = 437
opStructEndOmitEmpty opType = 438
opStructEndStringTag opType = 439
)
func (t opType) String() string {
if int(t) >= 440 {
return ""
}
return opTypeStrings[int(t)]
}
func (t opType) codeType() codeType {
if strings.Contains(t.String(), "Struct") {
if strings.Contains(t.String(), "End") {
return codeStructEnd
}
return codeStructField
}
if t.String() == "Array" || t.String() == "ArrayPtr" {
return codeArrayHead
}
if strings.Contains(t.String(), "ArrayElem") {
return codeArrayElem
}
if t.String() == "Slice" || t.String() == "SlicePtr" {
return codeSliceHead
}
if strings.Contains(t.String(), "SliceElem") {
return codeSliceElem
}
if t.String() == "Map" || t.String() == "MapPtr" {
return codeMapHead
}
if strings.Contains(t.String(), "MapKey") {
return codeMapKey
}
if strings.Contains(t.String(), "MapValue") {
return codeMapValue
}
if strings.Contains(t.String(), "MapEnd") {
return codeMapEnd
}
return codeOp
}
func (t opType) headToPtrHead() opType {
if strings.Index(t.String(), "PtrHead") > 0 {
return t
}
idx := strings.Index(t.String(), "Field")
if idx == -1 {
return t
}
suffix := "Ptr" + t.String()[idx+len("Field"):]
const toPtrOffset = 3
if strings.Contains(opType(int(t)+toPtrOffset).String(), suffix) {
return opType(int(t) + toPtrOffset)
}
return t
}
func (t opType) headToOmitEmptyHead() opType {
const toOmitEmptyOffset = 1
if strings.Contains(opType(int(t)+toOmitEmptyOffset).String(), "OmitEmpty") {
return opType(int(t) + toOmitEmptyOffset)
}
return t
}
func (t opType) headToStringTagHead() opType {
const toStringTagOffset = 2
if strings.Contains(opType(int(t)+toStringTagOffset).String(), "StringTag") {
return opType(int(t) + toStringTagOffset)
}
return t
}
func (t opType) ptrHeadToHead() opType {
idx := strings.Index(t.String(), "Ptr")
if idx == -1 {
return t
}
suffix := t.String()[idx+len("Ptr"):]
const toPtrOffset = 3
if strings.Contains(opType(int(t)-toPtrOffset).String(), suffix) {
return opType(int(t) - toPtrOffset)
}
return t
}
func (t opType) fieldToEnd() opType {
switch t {
case opStructFieldInt:
return opStructEndInt
case opStructFieldOmitEmptyInt:
return opStructEndOmitEmptyInt
case opStructFieldStringTagInt:
return opStructEndStringTagInt
case opStructFieldUint:
return opStructEndUint
case opStructFieldOmitEmptyUint:
return opStructEndOmitEmptyUint
case opStructFieldStringTagUint:
return opStructEndStringTagUint
case opStructFieldFloat32:
return opStructEndFloat32
case opStructFieldOmitEmptyFloat32:
return opStructEndOmitEmptyFloat32
case opStructFieldStringTagFloat32:
return opStructEndStringTagFloat32
case opStructFieldFloat64:
return opStructEndFloat64
case opStructFieldOmitEmptyFloat64:
return opStructEndOmitEmptyFloat64
case opStructFieldStringTagFloat64:
return opStructEndStringTagFloat64
case opStructFieldBool:
return opStructEndBool
case opStructFieldOmitEmptyBool:
return opStructEndOmitEmptyBool
case opStructFieldStringTagBool:
return opStructEndStringTagBool
case opStructFieldString:
return opStructEndString
case opStructFieldOmitEmptyString:
return opStructEndOmitEmptyString
case opStructFieldStringTagString:
return opStructEndStringTagString
case opStructFieldBytes:
return opStructEndBytes
case opStructFieldOmitEmptyBytes:
return opStructEndOmitEmptyBytes
case opStructFieldStringTagBytes:
return opStructEndStringTagBytes
case opStructFieldNumber:
return opStructEndNumber
case opStructFieldOmitEmptyNumber:
return opStructEndOmitEmptyNumber
case opStructFieldStringTagNumber:
return opStructEndStringTagNumber
case opStructFieldMarshalJSON:
return opStructEndMarshalJSON
case opStructFieldOmitEmptyMarshalJSON:
return opStructEndOmitEmptyMarshalJSON
case opStructFieldStringTagMarshalJSON:
return opStructEndStringTagMarshalJSON
case opStructFieldMarshalText:
return opStructEndMarshalText
case opStructFieldOmitEmptyMarshalText:
return opStructEndOmitEmptyMarshalText
case opStructFieldStringTagMarshalText:
return opStructEndStringTagMarshalText
case opStructFieldIntString:
return opStructEndIntString
case opStructFieldOmitEmptyIntString:
return opStructEndOmitEmptyIntString
case opStructFieldStringTagIntString:
return opStructEndStringTagIntString
case opStructFieldUintString:
return opStructEndUintString
case opStructFieldOmitEmptyUintString:
return opStructEndOmitEmptyUintString
case opStructFieldStringTagUintString:
return opStructEndStringTagUintString
case opStructFieldIntPtr:
return opStructEndIntPtr
case opStructFieldOmitEmptyIntPtr:
return opStructEndOmitEmptyIntPtr
case opStructFieldStringTagIntPtr:
return opStructEndStringTagIntPtr
case opStructFieldUintPtr:
return opStructEndUintPtr
case opStructFieldOmitEmptyUintPtr:
return opStructEndOmitEmptyUintPtr
case opStructFieldStringTagUintPtr:
return opStructEndStringTagUintPtr
case opStructFieldFloat32Ptr:
return opStructEndFloat32Ptr
case opStructFieldOmitEmptyFloat32Ptr:
return opStructEndOmitEmptyFloat32Ptr
case opStructFieldStringTagFloat32Ptr:
return opStructEndStringTagFloat32Ptr
case opStructFieldFloat64Ptr:
return opStructEndFloat64Ptr
case opStructFieldOmitEmptyFloat64Ptr:
return opStructEndOmitEmptyFloat64Ptr
case opStructFieldStringTagFloat64Ptr:
return opStructEndStringTagFloat64Ptr
case opStructFieldBoolPtr:
return opStructEndBoolPtr
case opStructFieldOmitEmptyBoolPtr:
return opStructEndOmitEmptyBoolPtr
case opStructFieldStringTagBoolPtr:
return opStructEndStringTagBoolPtr
case opStructFieldStringPtr:
return opStructEndStringPtr
case opStructFieldOmitEmptyStringPtr:
return opStructEndOmitEmptyStringPtr
case opStructFieldStringTagStringPtr:
return opStructEndStringTagStringPtr
case opStructFieldBytesPtr:
return opStructEndBytesPtr
case opStructFieldOmitEmptyBytesPtr:
return opStructEndOmitEmptyBytesPtr
case opStructFieldStringTagBytesPtr:
return opStructEndStringTagBytesPtr
case opStructFieldNumberPtr:
return opStructEndNumberPtr
case opStructFieldOmitEmptyNumberPtr:
return opStructEndOmitEmptyNumberPtr
case opStructFieldStringTagNumberPtr:
return opStructEndStringTagNumberPtr
case opStructFieldArrayPtr:
return opStructEndArrayPtr
case opStructFieldOmitEmptyArrayPtr:
return opStructEndOmitEmptyArrayPtr
case opStructFieldStringTagArrayPtr:
return opStructEndStringTagArrayPtr
case opStructFieldMapPtr:
return opStructEndMapPtr
case opStructFieldOmitEmptyMapPtr:
return opStructEndOmitEmptyMapPtr
case opStructFieldStringTagMapPtr:
return opStructEndStringTagMapPtr
case opStructFieldSlicePtr:
return opStructEndSlicePtr
case opStructFieldOmitEmptySlicePtr:
return opStructEndOmitEmptySlicePtr
case opStructFieldStringTagSlicePtr:
return opStructEndStringTagSlicePtr
case opStructFieldMarshalJSONPtr:
return opStructEndMarshalJSONPtr
case opStructFieldOmitEmptyMarshalJSONPtr:
return opStructEndOmitEmptyMarshalJSONPtr
case opStructFieldStringTagMarshalJSONPtr:
return opStructEndStringTagMarshalJSONPtr
case opStructFieldMarshalTextPtr:
return opStructEndMarshalTextPtr
case opStructFieldOmitEmptyMarshalTextPtr:
return opStructEndOmitEmptyMarshalTextPtr
case opStructFieldStringTagMarshalTextPtr:
return opStructEndStringTagMarshalTextPtr
case opStructFieldInterfacePtr:
return opStructEndInterfacePtr
case opStructFieldOmitEmptyInterfacePtr:
return opStructEndOmitEmptyInterfacePtr
case opStructFieldStringTagInterfacePtr:
return opStructEndStringTagInterfacePtr
case opStructFieldRecursivePtr:
return opStructEndRecursivePtr
case opStructFieldOmitEmptyRecursivePtr:
return opStructEndOmitEmptyRecursivePtr
case opStructFieldStringTagRecursivePtr:
return opStructEndStringTagRecursivePtr
}
return t
}
func (t opType) fieldToOmitEmptyField() opType {
const toOmitEmptyOffset = 1
if strings.Contains(opType(int(t)+toOmitEmptyOffset).String(), "OmitEmpty") {
return opType(int(t) + toOmitEmptyOffset)
}
return t
}
func (t opType) fieldToStringTagField() opType {
const toStringTagOffset = 2
if strings.Contains(opType(int(t)+toStringTagOffset).String(), "StringTag") {
return opType(int(t) + toStringTagOffset)
}
return t
}