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
{{ message }}
This repository has been archived by the owner on May 24, 2023. It is now read-only.
In many examples you're using log.Fatal, this will exit the program immediately with os.Exit(1) and probably isn't something you should encourage newcomers to the language to use. It would be nice if the examples just returned errors or logged them, not exited the program (which should be very unusual in go code). It also means things like defer statements you have in there wouldn't run.
because the defer is never called, since you call log.Fatal which calls os.Exit.
The comment about Go 1.4 will probably cause confusion now too as it is really out of date, probably better just to remove that now that the fix is in, or demote it to a footnote?
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
In many examples you're using log.Fatal, this will exit the program immediately with os.Exit(1) and probably isn't something you should encourage newcomers to the language to use. It would be nice if the examples just returned errors or logged them, not exited the program (which should be very unusual in go code). It also means things like defer statements you have in there wouldn't run.
So this example is misleading for example:
http://go-database-sql.org/prepared.html
because the defer is never called, since you call log.Fatal which calls os.Exit.
The comment about Go 1.4 will probably cause confusion now too as it is really out of date, probably better just to remove that now that the fix is in, or demote it to a footnote?
The text was updated successfully, but these errors were encountered: