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

fix(util/gconv): fix incompatable converting to nil pointer target from older version implement #4224

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

gqcn
Copy link
Member

@gqcn gqcn commented Mar 25, 2025

fixed: #4218

@gqcn gqcn requested a review from wln32 March 25, 2025 12:28
@houseme houseme requested a review from Copilot March 28, 2025 05:13
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR fixes an issue with incompatible converting to a nil pointer target as described in issue #4218. The changes refactor the conversion logic in the converter to avoid a duplicated type check and add unit tests for the fixed behavior.

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
util/gconv/internal/converter/converter_scan.go Removed redundant type checking in Scan and improved nil pointer logic.
util/gconv/gconv_z_unit_issue_test.go Added unit test to validate conversion behavior for issue #4218.

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.

gvar/Scan: When the field is a pointer, it does not take effect
1 participant