-
Notifications
You must be signed in to change notification settings - Fork 34
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
Go example for Command Line Arguments #16
Conversation
Linking with #2 |
@rishinair11 Please add details about changes added. It will set context for reviewers. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
generally very good; only could be more significant in a couple of places.
) | ||
|
||
func startJob() { | ||
//Defer is used to ensure that a function call is performed later |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
since the purpose is educational, I'd be more specfiic here; It's not only "later" but when the function returns to the caller
// recover() is useful only when called inside deferred functions (here, recoverForm()). | ||
// Executing a call to recover inside a deferred function stops the panicking sequence | ||
// by restoring normal execution and retrieves the error value passed to the call of panic. | ||
recoverObj := recover() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what can be the return value of recover() ? What do this object contains ?
//occur during normal operation, or that aren't prepared | ||
//to be handled gracefully | ||
|
||
if name == nil { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
checking for only name argument and not for the remaining two
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Few changes to be made in src/panic-defer-recover/panic.go in the conditional statements.
@rishinair11 Can you please have a look on review comments? |
Closing #16 due to inactivity. @rishinair11 Create separate PR once you are ready with changes. |
No description provided.