-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
grpcclient: return proper nil reference from grpcclient
The grpcclient would take an empty reference and convert it into a `(*reference)(nil)` and then store that in a `client.Reference`. This caused the `nil` check in `convertRef` to return false because it wasn't `nil` but then it panicked because it was `nil`. `newReference` has been minorly refactored to not return an error. The method is not exported, the error value is not used, and it obscured the functionality which made it harder to use correctly. Signed-off-by: Jonathan A. Sternberg <jonathan.sternberg@docker.com>
- Loading branch information
1 parent
6860c80
commit 40fb31b
Showing
2 changed files
with
45 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