Add comprehensive documentation to set commands#3642
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. |
ndyakov
left a comment
There was a problem hiding this comment.
Hello @iamamirsalehi and thank you for adding all the link. I did add one example on how a comment with a link should look like. Could you address all of them (or if you don't have the time, I can) and we can merge this.
…into doc/set-commands
❌ Security scan failedSecurity scan failed: Branch doc/set-commands does not exist in the remote repository 💡 Need to bypass this check? Comment |
|
Hello @ndyakov, and thank you for the review. I've applied the changes. |
❌ Security scan failedSecurity scan failed: Branch doc/set-commands does not exist in the remote repository 💡 Need to bypass this check? Comment |
|
@iamamirsalehi would you mind running |
ndyakov
left a comment
There was a problem hiding this comment.
The doc comments look good, thank you @iamamirsalehi! Let's just fix the build.
❌ Security scan failedSecurity scan failed: Branch doc/set-commands does not exist in the remote repository 💡 Need to bypass this check? Comment |
❌ Security scan failedSecurity scan failed: Branch doc/set-commands does not exist in the remote repository 💡 Need to bypass this check? Comment |
|
@ndyakov, thanks for your attention and for being patient with this PR. I ran the command you mentioned, and I think it looks good now. |
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