mirror of https://github.com/goccy/go-json.git
Merge pull request #143 from goccy/feature/remove-unnecessary-op
Remove unnecessary optype
This commit is contained in:
commit
cd03bc4033
|
@ -295,18 +295,11 @@ func (t opType) fieldToStringTagField() opType {
|
||||||
"StructEnd",
|
"StructEnd",
|
||||||
}
|
}
|
||||||
primitiveTypes := []string{
|
primitiveTypes := []string{
|
||||||
"int", "int8", "int16", "int32", "int64",
|
"int", "uint", "float32", "float64", "bool", "string", "bytes",
|
||||||
"uint", "uint8", "uint16", "uint32", "uint64",
|
|
||||||
"float32", "float64", "bool", "string", "bytes",
|
|
||||||
"array", "map", "mapLoad", "slice", "struct", "MarshalJSON", "MarshalText", "recursive",
|
"array", "map", "mapLoad", "slice", "struct", "MarshalJSON", "MarshalText", "recursive",
|
||||||
"intString", "int8String", "int16String", "int32String", "int64String",
|
"intString", "uintString",
|
||||||
"uintString", "uint8String", "uint16String", "uint32String", "uint64String",
|
"intPtr", "uintPtr", "float32Ptr", "float64Ptr", "boolPtr", "stringPtr", "bytesPtr",
|
||||||
"intPtr", "int8Ptr", "int16Ptr", "int32Ptr", "int64Ptr",
|
"intNPtr", "uintNPtr", "float32NPtr", "float64NPtr", "boolNPtr", "stringNPtr", "bytesNPtr",
|
||||||
"uintPtr", "uint8Ptr", "uint16Ptr", "uint32Ptr", "uint64Ptr",
|
|
||||||
"float32Ptr", "float64Ptr", "boolPtr", "stringPtr", "bytesPtr",
|
|
||||||
"intNPtr", "int8NPtr", "int16NPtr", "int32NPtr", "int64NPtr",
|
|
||||||
"uintNPtr", "uint8NPtr", "uint16NPtr", "uint32NPtr", "uint64NPtr",
|
|
||||||
"float32NPtr", "float64NPtr", "boolNPtr", "stringNPtr", "bytesNPtr",
|
|
||||||
}
|
}
|
||||||
primitiveTypesUpper := []string{}
|
primitiveTypesUpper := []string{}
|
||||||
for _, typ := range primitiveTypes {
|
for _, typ := range primitiveTypes {
|
||||||
|
@ -408,8 +401,7 @@ func (t opType) fieldToStringTagField() opType {
|
||||||
switch typ {
|
switch typ {
|
||||||
case "", "Array", "Map", "MapLoad", "Slice",
|
case "", "Array", "Map", "MapLoad", "Slice",
|
||||||
"Struct", "Recursive", "MarshalJSON", "MarshalText",
|
"Struct", "Recursive", "MarshalJSON", "MarshalText",
|
||||||
"IntString", "Int8String", "Int16String", "Int32String", "Int64String",
|
"IntString", "UintString":
|
||||||
"UintString", "Uint8String", "Uint16String", "Uint32String", "Uint64String":
|
|
||||||
return op
|
return op
|
||||||
}
|
}
|
||||||
return fmt.Sprintf(
|
return fmt.Sprintf(
|
||||||
|
|
5736
encode_optype.go
5736
encode_optype.go
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue