mirror of https://github.com/goccy/go-json.git
Fix conversion of operation for PtrHead to Head
This commit is contained in:
parent
45fb730c34
commit
918e816ae4
|
@ -120,7 +120,7 @@ func (t OpType) HeadToOmitEmptyHead() OpType {
|
|||
}
|
||||
|
||||
func (t OpType) PtrHeadToHead() OpType {
|
||||
idx := strings.Index(t.String(), "Ptr")
|
||||
idx := strings.Index(t.String(), "PtrHead")
|
||||
if idx == -1 {
|
||||
return t
|
||||
}
|
||||
|
|
|
@ -894,7 +894,7 @@ func (t OpType) HeadToOmitEmptyHead() OpType {
|
|||
}
|
||||
|
||||
func (t OpType) PtrHeadToHead() OpType {
|
||||
idx := strings.Index(t.String(), "Ptr")
|
||||
idx := strings.Index(t.String(), "PtrHead")
|
||||
if idx == -1 {
|
||||
return t
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue