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

feat: add int/int32/Stringer support when get atomicValue #1130

Merged
merged 1 commit into from
Jun 30, 2021

Conversation

kagaya85
Copy link
Member

When the variable type is int/int32, I think we can also try to convert it to the desired type, as the int is sometimes the default type for many conversions (such as Unmarshal), and if it is string we can also try to assert whether implements the String method.

Further more, is it reasonable to convert any other two types that is convertible (such as boolean true to int 1)?

Please point out if there is anything I have not considered. Thanks in advance.

Copy link
Member

@tonybase tonybase left a comment

Choose a reason for hiding this comment

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

LGTM

@tonybase tonybase merged commit bba6f16 into go-kratos:main Jun 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants