Skip to content
This repository has been archived by the owner on May 24, 2023. It is now read-only.

Add code comment to ease understanding #105

Open
wants to merge 1 commit into
base: gh-pages
Choose a base branch
from

Conversation

twoi
Copy link

@twoi twoi commented Aug 17, 2019

As I'm not the only one who stumbled upon this, let's just add a comment to the example code.

No logging library I have worked with goes as far as terminating the program, so many go beginners may not understand this - although I think it does make sense. (Otherwise - what's the meaning of "fatal"?)

As I'm [not the only one](VividCortex#70) who stumbled upon this, let's just add a comment to the example code.

No logging library I have worked with goes as far as terminating the program, so many go beginners may not understand this - although I think it does make sense. (Otherwise - what's the meaning of "fatal"?)
Copy link

@gkristic-vc gkristic-vc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

True, just like any deferred function, rows.Close won't be called if the application aborts. Not sure why this would be a problem, though. Maybe we could change all log.Fatal to return? It's not the point in the example anyway. (See also the last paragraph here.)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants