-
Notifications
You must be signed in to change notification settings - Fork 498
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
Must* methods are inconsistent with the standard library. #15
Comments
That’s a valid point. But the ideal, IMHO, would be to have Also, shouldn’t the error be the first return parameter? |
gabriel-alecu
pushed a commit
to gabriel-alecu/go-simplejson
that referenced
this issue
Jul 17, 2014
- Added "Check" prefix to the ones that also return an error. - Removed the "Must" prefix from those that always return a valid value. fixes issue bitly#15
gabriel-alecu
pushed a commit
to gabriel-alecu/go-simplejson
that referenced
this issue
Jul 17, 2014
- Added "Check" prefix to the ones that also return an error. - Removed the "Must" prefix from those that always return a valid value. fixes issue bitly#15
xyproto
pushed a commit
to xyproto/jpath
that referenced
this issue
Jun 16, 2015
- Added "Check" prefix to the ones that also return an error. - Removed the "Must" prefix from those that always return a valid value. fixes issue bitly#15
jacoduplessis
added a commit
to jacoduplessis/simplejson
that referenced
this issue
May 28, 2018
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I find the
Must*
methods to be fairly misleading. In the standard library aMust
prefix implies that when the underlying function/method returns an error a runtime panic will be occur. It wasn't until reading the source code that I realized this was not the case. I would like to propose two things:Just
would be more appropriate.The text was updated successfully, but these errors were encountered: