Skip to content

Commit

Permalink
fix: register type with prefix
Browse files Browse the repository at this point in the history
  • Loading branch information
bcho committed Aug 4, 2023
1 parent 89f1565 commit f8a0499
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions mockgen/model/model.go
Original file line number Diff line number Diff line change
Expand Up @@ -147,12 +147,12 @@ type Type interface {
}

func init() {
gob.Register(&ArrayType{})
gob.Register(&ChanType{})
gob.Register(&FuncType{})
gob.Register(&MapType{})
gob.Register(&NamedType{})
gob.Register(&PointerType{})
gob.RegisterName(pkgPath+".ArrayType", &ArrayType{})
gob.RegisterName(pkgPath+".ChanType", &ChanType{})
gob.RegisterName(pkgPath+".FuncType", &FuncType{})
gob.RegisterName(pkgPath+".MapType", &MapType{})
gob.RegisterName(pkgPath+".NamedType", &NamedType{})
gob.RegisterName(pkgPath+".PointerType", &PointerType{})

// Call gob.RegisterName to make sure it has the consistent name registered
// for both gob decoder and encoder.
Expand Down

0 comments on commit f8a0499

Please sign in to comment.