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

Disable Color for Compare and Compare Headers #6

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

akshat99812
Copy link

This PR adds feature that disables color for the "Compare" and "Compare Headers" functions in the application.

Issue Fixed:#4

@shivamsouravjha, could you please review this PR?
Screenshot 2024-10-20 at 7 29 55 PM
Screenshot 2024-10-20 at 7 30 17 PM
Screenshot 2024-10-20 at 7 30 28 PM

Signed-off-by: akshat99812 <[email protected]>
Comment on lines 59 to 61
// expectedJSON: The JSON string containing the expected values.
// actualJSON: The JSON string containing the actual values.
// Returns a Diff struct containing the colorized differences for the expected and actual JSON responses.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add a comment in description as well ~ helps in auto generated documentation https://pkg.go.dev/github.com/keploy/jsonDiff

jsondiff.go Outdated
Comment on lines 738 to 740
func CompareHeaders(expectedHeaders, actualHeaders map[string]string, options ...bool) Diff {
disableColor := false
if len(options) > 0 {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

better to keep it array of interfaces no? and define in comments as well

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Screenshot 2024-10-21 at 3 34 22 PM

did you mean this when you said to use array of interfaces?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes sir added the changes

Signed-off-by: akshat99812 <[email protected]>
@akshat99812
Copy link
Author

Hi @ayush3160 @shivamsouravjha , I hope you're doing well! Could you kindly let me know if there’s anything I can improve to help get it merged?

@Sarthak160
Copy link
Member

@shivamsouravjha Does this needs more changes ?? Also @akshat99812 Please resolve the conflicts.

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.

3 participants