Open
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR adds support for Redis hash and JSON producers to handle two different data formats, along with updates in the emitter and CLI commands to allow users to select the desired Redis data type.
- Introduces a new JSONProducer (and corresponding tests) alongside the existing HashProducer.
- Updates the emitter to create the proper Redis producer based on the output mode.
- Adjusts CLI flags and the producer list to include "redishash" and "redisjson" options.
Reviewed Changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| pkg/producers/redis/jsonProducer.go | New JSON producer implementation for storing JSON data |
| pkg/producers/redis/hashProducer_test.go | Added tests for HashProducer |
| pkg/producers/redis/hashProducer.go | Hash producer implementation |
| pkg/producers/redis/jsonProducer_test.go | Added tests for JSONProducer |
| pkg/emitter/emitter.go | Updated emitter to support both Redis hash and JSON producers |
| pkg/cmd/templateRun.go | Updated CLI output flag descriptions to include redis options |
| pkg/cmd/producerList.go | Updated producer list to display redisjson and redishash options |
Comments suppressed due to low confidence (1)
pkg/producers/redis/hashProducer.go:14
- Consider changing the Redis client field to a pointer (*redis.Client) to align with the go-redis library's intended usage and avoid potential issues with internal state management.
client redis.Client
Collaborator
|
LGTM! |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.