You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
kstola2 edited this page Jun 25, 2019
·
5 revisions
Syntax
We use camel-case for variable and function names.
Errors
Returning custom errors from your functions is a way of identifying the root of undesired behavior. If there is a case in your function that checks for errors, make sure to return it with the following format:
if err != nil {
errors.New("Failed to do the thing:\n" + err.Error())
}
This will allow us to build our own stack trace which is great for debugging.