Skip to content

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 <138353837+akshat99812@users.noreply.github.com>
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
Contributor

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
Contributor

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
Contributor

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 <138353837+akshat99812@users.noreply.github.com>
@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.

@keploy
Copy link

keploy bot commented Apr 15, 2025

Keploy failed to create test cases for this PR. For retrying, please click here

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