Skip to content

Conversation

@hunjixin
Copy link

No description provided.

@hunjixin hunjixin force-pushed the feat/allow_empty_string branch from ab9046a to 4f0d588 Compare October 19, 2023 15:56
Comment on lines +1319 to +1322
if len(str) == 0 {
*d = Zero
return nil
}
Copy link
Member

Choose a reason for hiding this comment

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

I'm not sure if this should be the default library behavior. I think in most cases empty string is treated as an incorrect value, we should not implicitly cast it to zero value. I understand there could be use cases for such behavior, but it should be at least hidden behind a config flag.
See #216 for additional details.

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