-
Notifications
You must be signed in to change notification settings - Fork 7
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
[all] Always assert NotNil for values that, eh, shouldn't be nil ;) #8
Comments
I noticed also in many of the unit tests you are doing things like asserting NotNil for errors and NotEquals for slice lengths. The assert package has some more sophisticated functions like NoError (), Error(), Len(), etc... We should take advantage of these where possible. |
Next you'll be suggesting that I read the documentation ;)
|
Lol Did I miss something in the docs? :x On Thu Jan 29 2015 at 11:56:45 AM Fraser Scott [email protected]
|
No no. I think I saw an example that include NotNil and Equal and just ran with those, rather than reading the other possibilities. |
Ah gotcha. haha Yea, there are a load of options. I am only familiar myself On Thu Jan 29 2015 at 1:47:52 PM Fraser Scott [email protected]
|
Most returns are either "nil, error" or "something, nil". Need to catch accidental "nil, nil"
The text was updated successfully, but these errors were encountered: