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

Use value receiver for Value() #187

Open
HydroH opened this issue Oct 23, 2024 · 0 comments
Open

Use value receiver for Value() #187

HydroH opened this issue Oct 23, 2024 · 0 comments

Comments

@HydroH
Copy link

HydroH commented Oct 23, 2024

Many orms represent nullable value by pointers and non-null value by struct value. uint256.Int however uses pointer receiver for Value(), which causes panic when trying to store a null value to database, because the pointer is nil. It is a common practice to use value receiver for Value() interface to avoid such problems.

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