Skip to content
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

archive/zip: why do the examples use log.Fatal #6053

Closed
gopherbot opened this issue Aug 6, 2013 · 2 comments
Closed

archive/zip: why do the examples use log.Fatal #6053

gopherbot opened this issue Aug 6, 2013 · 2 comments
Assignees

Comments

@gopherbot
Copy link

@gopherbot gopherbot commented Aug 6, 2013

by feedback.test.account:

https://feedback.corp.google.com/#/Report/1130090779

Description:
Why is it that this "if err != nil {log.Fatal(err)}"
is used everywhere instead of a function call
to something that handles the error?

UI language: en
Detected language: en
@robpike
Copy link
Contributor

@robpike robpike commented Aug 6, 2013

Comment 1:

Owner changed to @adg.

@adg
Copy link
Contributor

@adg adg commented Aug 12, 2013

Comment 2:

In a very short program, as these examples are, it makes sense to exit when there is an
error.
In a larger program, one might return the error value to indicate to the calling code
that something went wrong.

Labels changed: removed restrict-view-owner.

Status changed to WorkingAsIntended.

@golang golang locked and limited conversation to collaborators Jun 24, 2016
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.