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

Code Analysis and Improvement Suggestions #32

Open
ellinababayan opened this issue Sep 14, 2023 · 0 comments
Open

Code Analysis and Improvement Suggestions #32

ellinababayan opened this issue Sep 14, 2023 · 0 comments

Comments

@ellinababayan
Copy link

Hi there! I had a chance to analyse a code of this repo and I have a few suggections for you:

1.Consider adding comments and documentation to your code to explain the purpose of the functions, expected input and output, and any relevant details about how the HTTP requests are being handled. This will make it easier for others (and your future self) to understand and use the package.
2. The code unmarshals the HTTP response body twice in some cases (once to check for errors and then to parse the response into the ret interface). You can optimize this by unmarshaling once and reusing the result if there are no errors.
3. Be cautious when sending and handling sensitive data, such as authorization tokens. Ensure that sensitive data is handled securely and doesn't leak in error messages or logs.

Let me know if there is something I'm missing or if you have any questions
Thanks for your time

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

No branches or pull requests

1 participant