This repository has been archived by the owner on Nov 8, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 294
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fixes #804: give fixed names to gob registered types
When using vendoring in Go 1.6, reflection is in gob.Register to create a key for type lookups. This `reflect.PkgPath()` call returns a "globally unique" key for looking up types, and in the case of a vendored type, is not valid for matching gob registration names. This is because on the server side, the type is registered as `import/path.(typename)`, but on the client side (vendored) it looks like `client/vendor/import/path.(typename)`. Using fixed keys bypasses the need for reflection and is safe on either side, even when using vendoring.
- Loading branch information
Showing
2 changed files
with
20 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters