Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hedge against the "zero Value" #76

Merged
merged 1 commit into from
May 30, 2018
Merged

Conversation

brandur-stripe
Copy link
Contributor

Reflect in Go has the concept of a "zero Value" [1] (not be confused with a
type's zero value with a lowercase "v") and asking for Type on one will
panic. I'm not exactly sure under what conditions these are generated,
but they are occasionally, so here we hedge against them.

See also: #75

Fixes #75.

[1] https://golang.org/pkg/reflect/#Value

Reflect in Go has the concept of a "zero Value" [1] (not be confused with a
type's zero value with a lowercase "v") and asking for Type on one will
panic. I'm not exactly sure under what conditions these are generated,
but they are occasionally, so here we hedge against them.

See also: #75

Fixes #75.

[1] https://golang.org/pkg/reflect/#Value
@brandur-stripe brandur-stripe merged commit 56c5482 into master May 30, 2018
@brandur-stripe brandur-stripe deleted the brandur-hedge-zero-value branch May 30, 2018 00:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants