Skip to content
This repository has been archived by the owner on Nov 5, 2024. It is now read-only.

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 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.

2 participants