-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Add comprehensive documentation to set commands #3642
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
base: master
Are you sure you want to change the base?
Conversation
|
Hi, I’m Jit, a friendly security platform designed to help developers build secure applications from day zero with an MVS (Minimal viable security) mindset. In case there are security findings, they will be communicated to you as a comment inside the PR. Hope you’ll enjoy using Jit. Questions? Comments? Want to learn more? Get in touch with us. |
|
Hello @iamamirsalehi, thank you for this contribution. I will review it as soon as possible. |
|
Hello @ndyakov, Thank you for reviewing. I’ll add more documentation for the other methods if you find it useful. |
|
@iamamirsalehi thank you for this initiative once again! In the comments for a given command, it will be useful if we provide link to the official documentation on redis.io. You can take a look at: Line 594 in f711eb0
and read about links in godoc: https://go.dev/doc/comment#links Consider this a pr wide comment, we can add such links to all comments. |
|
@ndyakov Thank you for reviewing. Sure, I'll apply it to all comments |
|
Hi @ndyakov, thanks for your feedback, I applied the changes, could you please review it again. After your confirm, I'll write doc for other command files too, and make a PR for each of them. |
Add comprehensive documentation to set commands
Summary
This PR adds detailed documentation to all set command methods in
set_commands.goto improve developer experience and code discoverability.Changes
SetCmdableexplaining its purposeSAdd- Add members to a setSCard- Get set cardinalitySDiff- Set difference operationSDiffStore- Store set difference resultSInter- Set intersection operationSInterCard- Get intersection cardinalitySInterStore- Store set intersection resultSIsMember- Check membershipSMIsMember- Check multiple membershipsSMembers- Get all members (slice)SMembersMap- Get all members (map)SMove- Move member between setsSPop- Pop random memberSPopN- Pop multiple random membersSRandMember- Get random memberSRandMemberN- Get multiple random membersSRem- Remove membersSScan- Incrementally scan setSUnion- Set union operationSUnionStore- Store set union resultDocumentation Details
Each method now includes:
SScan)Benefits
SScanTesting