Skip to content

Commit

Permalink
doc: call out why we need pkgPath prefix
Browse files Browse the repository at this point in the history
  • Loading branch information
bcho committed Aug 12, 2023
1 parent f8a0499 commit fc1f717
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions mockgen/model/model.go
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,8 @@ type Type interface {
}

func init() {
// Call gob.RegisterName with pkgPath as prefix to avoid conflicting with
// github.com/golang/mock/mockgen/model 's registration.
gob.RegisterName(pkgPath+".ArrayType", &ArrayType{})
gob.RegisterName(pkgPath+".ChanType", &ChanType{})
gob.RegisterName(pkgPath+".FuncType", &FuncType{})
Expand Down

0 comments on commit fc1f717

Please sign in to comment.