-
Notifications
You must be signed in to change notification settings - Fork 69
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
bump pkg´s #1555
bump pkg´s #1555
Conversation
WalkthroughThe pull request introduces a minor modification to the Changes
Possibly related PRs
Suggested reviewers
Poem
Finishing Touches
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (1)
rueidis/rueidis.go (1)
106-106
: LGTM! Consistent with changes in valkey/valkey.go.The optimization is correctly applied here as well, maintaining consistency across both implementations.
Consider extracting the common storage implementation into a shared base struct to reduce code duplication between
valkey/valkey.go
andrueidis/rueidis.go
. This would make future maintenance easier and ensure consistent behavior across implementations.Example approach:
// common/storage.go type BaseStorage struct { // Common fields and methods } func (s *BaseStorage) Set(key string, val []byte, exp time.Duration) error { if len(key) <= 0 || len(val) <= 0 { return nil } return s.doSet(key, val, exp) // Implementation provided by concrete types }Also applies to: 108-108
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (6)
.github/workflows/golangci-lint.yml
is excluded by!**/*.yml
go.mod
is excluded by!**/*.mod
rueidis/go.mod
is excluded by!**/*.mod
rueidis/go.sum
is excluded by!**/*.sum
,!**/*.sum
valkey/go.mod
is excluded by!**/*.mod
valkey/go.sum
is excluded by!**/*.sum
,!**/*.sum
📒 Files selected for processing (2)
rueidis/rueidis.go
(1 hunks)valkey/valkey.go
(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (1)
- GitHub Check: Compare
🔇 Additional comments (2)
valkey/valkey.go (1)
106-106
: LGTM! Performance improvement through direct type conversion.The change from
utils.ToString(val)
tostring(val)
is a good optimization. Direct type conversion is more efficient as it avoids the function call overhead while maintaining the same safety guarantees. This is also more idiomatic Go code.Also applies to: 108-108
rueidis/rueidis.go (1)
106-108
: PR title doesn't match the actual changes.The PR title "bump pkg's" suggests package version updates, but the changes are actually code optimizations replacing
utils.ToString(val)
with directstring(val)
conversion. Consider updating the PR title to better reflect the actual changes, e.g., "perf: optimize string conversion in Set methods".Let's check if there are any package version updates in the repository:
Summary by CodeRabbit
The changes appear to be a minor optimization in string conversion techniques across different storage interfaces, which should provide more direct and potentially more efficient string handling.