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

Improve code quality with regard to the code review #30

Merged
merged 37 commits into from
Nov 14, 2022

Conversation

dilanSachi
Copy link
Contributor

@dilanSachi dilanSachi commented Nov 11, 2022

Purpose

$subject

ToDo

@dilanSachi
Copy link
Contributor Author

Improve https://github.com/dilanSachi/gcp-microservices-demo/blob/08789d2abfc8781be5fdcb1680255e1484e7f7db/currency/currency_service.bal#L64 since it can cause an overflow

int units = <int>targetAmount.floor();
Since targetAmount is coming from units and units is denoted as int64 in the proto definition, we can make sure an overflow won't happen

frontend/rpc.bal Outdated Show resolved Hide resolved
@dilanSachi
Copy link
Contributor Author

@chamil321 Updated http method docs
777fa7a

@dilanSachi dilanSachi marked this pull request as ready for review November 14, 2022 03:46
@dilanSachi
Copy link
Contributor Author

Find a way to merge money_utils.bal in frontend and currency

In the original sample, money utils are duplicated in both checkout service and frontend. So I think its ok if we have the same approach.

@dilanSachi dilanSachi merged commit 4f3929b into ballerina-guides:main Nov 14, 2022
@dilanSachi dilanSachi deleted the add-lang-practices branch November 14, 2022 13:01
Copy link
Contributor

@gimantha gimantha left a comment

Choose a reason for hiding this comment

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

LGTM

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.

None yet

5 participants