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

Go example for Command Line Arguments #16

Closed
wants to merge 5 commits into from

Conversation

rishinair11
Copy link

No description provided.

@sagar-jadhav
Copy link
Owner

Linking with #2

@sagar-jadhav sagar-jadhav added good first issue Good for newcomers Hacktoberfest Issues to participate in Hacktoberfest 2021 labels Oct 4, 2019
@sagar-jadhav
Copy link
Owner

@rishinair11 Please add details about changes added. It will set context for reviewers.

Copy link
Contributor

@ilmanzo ilmanzo left a 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
Copy link
Contributor

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()
Copy link
Contributor

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 {
Copy link
Collaborator

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

Copy link
Collaborator

@rajkumarGosavi rajkumarGosavi left a 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.

@sagar-jadhav sagar-jadhav requested review from aprabhat and removed request for LukaJaj October 5, 2019 04:21
@sagar-jadhav
Copy link
Owner

@rishinair11 Can you please have a look on review comments?

@sagar-jadhav
Copy link
Owner

Closing #16 due to inactivity. @rishinair11 Create separate PR once you are ready with changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers Hacktoberfest Issues to participate in Hacktoberfest 2021
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants