Skip to content

Commit

Permalink
fix: replace Pointer to Ptr
Browse files Browse the repository at this point in the history
  • Loading branch information
liuq19 committed Feb 2, 2024
1 parent a02760d commit 397e858
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion dev/decoder/compile_struct.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ func (c *compiler) compileFieldStringOption(vt reflect.Type) decFunc {
fallthrough
case reflect.Int:
return c.compileIntStringOption(vt)
case reflect.Pointer:
case reflect.Ptr:
return &ptrStrDecoder{
typ: rt.UnpackType(vt.Elem()),
deref: c.compileFieldStringOption(vt.Elem()),
Expand Down
2 changes: 1 addition & 1 deletion dev/decoder/compiler.go
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ func (c *compiler) compilePtr(vt reflect.Type) decFunc {
defer c.exit(vt)

// specail logic for Named Ptr, issue 379
if reflect.PointerTo(vt.Elem()) != vt {
if reflect.PtrTo(vt.Elem()) != vt {
return &ptrDecoder{
typ: rt.UnpackType(vt.Elem()),
deref: c.compileBasic(vt.Elem()),
Expand Down

0 comments on commit 397e858

Please sign in to comment.