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

Issues - RequesetToken 리턴 타입 수정 #6

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

limsg1234
Copy link

Issues 의 RequestToken 수정에 대한 수정입니다.
리턴타입을 map 에서 string 으로 교체했습니다.

Copy link
Contributor

@dc7303 dc7303 left a comment

Choose a reason for hiding this comment

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

@limsg1234 작업해주셔서 너무 감사합니다! 👍
몇가지 의견을 남겨드렸습니다. 확인 후 편하게 의견 부탁드리겠습니다 :)

easycodefgo.go Outdated
@@ -267,3 +271,7 @@ func checkNeedValueInTwoWayInfo(twoWayInfo map[string]interface{}) bool {
}
return true
}

func convertToString(tokenMap map[string]interface{}) (string){
Copy link
Contributor

Choose a reason for hiding this comment

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

단지 캐스팅하는 로직이기 때문에 함수로 따로 빼지 않아도 될 것 같은데 어떻게 생각하시나요~?

easycodefgo.go Outdated
Comment on lines 159 to 160
token, err := requestToken(self.clientID, self.clientSecret)
return convertToString(token), err
Copy link
Contributor

Choose a reason for hiding this comment

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

requestToken()에서 토큰을 확인해서 반환하는 것은 어떨까요?
확인하는 과정에서 토큰이 존재하지 않거나, 예상하지 못한 응답일경우 관련 에러를 반환해주는게 좋을 것 같다고 생각합니다.

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