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

Add DefaultFormatter.EnableRequests and EnableResponses #337

Merged
merged 7 commits into from
Mar 22, 2023

Conversation

gdguesser
Copy link
Contributor

@gdguesser gdguesser commented Mar 18, 2023

Closes #159

@coveralls
Copy link
Collaborator

coveralls commented Mar 18, 2023

Coverage Status

Coverage: 94.931% (-0.01%) from 94.942% when pulling 90c2151 on gdguesser:159-enable-request-response into 6370ae2 on gavv:master.

@gavv gavv added the ready for review Pull request can be reviewed label Mar 18, 2023
@github-actions
Copy link

☔ The latest upstream change (presumably these) made this pull request unmergeable. Please resolve the merge conflicts.

@github-actions github-actions bot added the needs rebase Pull request has conflicts and should be rebased label Mar 22, 2023
@gavv gavv merged commit 31fa192 into gavv:master Mar 22, 2023
@gavv
Copy link
Owner

gavv commented Mar 22, 2023

Thanks!

I've pushed follow-up commit: 70906db

What I changed:

  • the new feature seems pretty useful and the output is rather compact, so I enabled it by default by replacing DisableRequest/DisableResponse with EnableRequest/EnableResponse

  • I added HaveRequest and HaveResponse to FormatData; they're not necessary in this case, just for consistency with other fields

  • fixed nil checks: refIsNil is not needed because typed nils are not possible here; on the other hand we need to check if httpReq/httpResp is non-nil

  • replaced panics with returns; formatter is not critical part, so it's better to skip a section instead of refusing to work at all, in case of a bug

  • added trimming

@gavv gavv removed ready for review Pull request can be reviewed needs rebase Pull request has conflicts and should be rebased labels Mar 22, 2023
@gdguesser gdguesser deleted the 159-enable-request-response branch March 22, 2023 18:36
@gavv
Copy link
Owner

gavv commented Mar 23, 2023

Also welcome to our discord server!

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.

Add DefaultFormatter.EnableRequests and EnableResponses
3 participants