Skip to content

Conversation

oncilla
Copy link
Contributor

@oncilla oncilla commented Dec 10, 2019

Do not panic in common.TypeOf when receiving a non-typed nil.


This change is Reviewable

@oncilla oncilla added the bug Something isn't working label Dec 10, 2019
@oncilla oncilla requested a review from scrye December 10, 2019 11:15
Copy link
Contributor

@scrye scrye left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 3 of 3 files at r1.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @oncilla)

a discussion (no related file):
I know it's not related to this, but can you please also add that infra.ResponseWriterFromContext return false when h.request.Context() is nil?



go/lib/common/defs_test.go, line 31 at r1 (raw file):

		"typed nil":    (*A)(nil),
		"typed ptr":    &A{},
		"typed struct": A{},

Nit: you can't have an untyped struct / ptr, so might just call them ptr / struct.

Do not panic in common.TypeOf when receiving a non-typed nil.
Copy link
Contributor Author

@oncilla oncilla left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: 3 of 6 files reviewed, 1 unresolved discussion (waiting on @scrye)

a discussion (no related file):

Previously, scrye (Sergiu Costea) wrote…

I know it's not related to this, but can you please also add that infra.ResponseWriterFromContext return false when h.request.Context() is nil?

Done.
Will reflect in the commit message when merging.


Copy link
Contributor

@scrye scrye left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm:

Reviewed 4 of 4 files at r2.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved

@oncilla oncilla merged commit ddad9c2 into scionproto:master Dec 10, 2019
@oncilla oncilla deleted the pub-type-of-nil branch December 10, 2019 12:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants