return nil schema on error #540
Open
Conversation
fcd314a
to
51495a7
|
This will break a lot of people's code. So while I agree that it should be done, it should probably be done so in a major release. Additionally you should be checking the error returned before you attempt to access the schema. If the "programmer is to lazy to check the error" then they are probably too lazy to check that the schema returned nil, so they will still get an exception regardless. |
|
I agree with merge it for a major release. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Golang methods shouldn't return zero value structs on error. So, we should return
*Schemaon theNewSchemamethod.Why:
https://groups.google.com/d/msg/golang-nuts/4yBldwsjZwo/sFcz1KVhU3wJ