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

Allow scanning redis values into pointer fields #2787

Merged
merged 4 commits into from
Dec 17, 2023

Conversation

splundid
Copy link
Contributor

@splundid splundid commented Nov 3, 2023

Sometimes it's convenient to represent your data with structs that contain pointer fields:

type Message struct {
     hasPermission *bool `redis:"has_permission,omitempty"`
}

With nil indicating that the value is absent.

This change allows go-redis to scan data into pointer fields

@ofekshenawa ofekshenawa merged commit c828764 into redis:master Dec 17, 2023
9 checks passed
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

2 participants