forked from mirror/go-json
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 {
|
func (t OpType) PtrHeadToHead() OpType {
|
||||||
idx := strings.Index(t.String(), "Ptr")
|
idx := strings.Index(t.String(), "PtrHead")
|
||||||
if idx == -1 {
|
if idx == -1 {
|
||||||
return t
|
return t
|
||||||
}
|
}
|
||||||
|
|
|
@ -894,7 +894,7 @@ func (t OpType) HeadToOmitEmptyHead() OpType {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (t OpType) PtrHeadToHead() OpType {
|
func (t OpType) PtrHeadToHead() OpType {
|
||||||
idx := strings.Index(t.String(), "Ptr")
|
idx := strings.Index(t.String(), "PtrHead")
|
||||||
if idx == -1 {
|
if idx == -1 {
|
||||||
return t
|
return t
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue