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

Changed processing order and added error check #7

Merged
merged 2 commits into from
Mar 10, 2019

Conversation

qt-luigi
Copy link
Contributor

@qt-luigi qt-luigi commented Mar 9, 2019

First checked the token and delayed generateRequest() execution. (order by processing weight.)
Added error check because req.Header.Set() generates a panic when return value of generateRequest() is nil, err.
As a result, the processing order is similar to generateRequest().

api.go Outdated
req.Header.Set("X-USER-TOKEN", token)
}

return rep, err
Copy link
Owner

Choose a reason for hiding this comment

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

typo?
Correctly, rep is req ... ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, it's typo... rep is req...

@a-know
Copy link
Owner

a-know commented Mar 9, 2019

Thank you for pull-request!!

I commented only one part.

@a-know
Copy link
Owner

a-know commented Mar 10, 2019

Thank you!!

@a-know a-know merged commit 0e05ed4 into a-know:master Mar 10, 2019
@qt-luigi qt-luigi deleted the changePositionAndReturnError branch March 10, 2019 10:25
@qt-luigi
Copy link
Contributor Author

I had many mistakes this time...(^^;) Thanks for merging me!

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

Successfully merging this pull request may close these issues.

2 participants