cyberark / conjur-cli-go

CyberArk Conjur command line interface (Go)
Apache License 2.0
4 stars 2 forks source link

Generalize req/res body redaction #131

Closed john-odonnell closed 1 year ago

john-odonnell commented 1 year ago

Desired Outcome

DRYing this up. redactRequestBody and redactResponseBody did a lot of the same stuff, but I couldn't set up a generic type to represent them both.

Implemented Changes

Instead of running body redaction logic against *http.Request and *http.Response objects, operate against pointers to their ReadCloser bodies and int64 content-lengths.

Connected Issue/Story

N/A

Definition of Done

At least 1 todo must be completed in the sections below for the PR to be merged.

Changelog

Test coverage

Documentation

Behavior

Security

codeclimate[bot] commented 1 year ago

Code Climate has analyzed commit 78ce00c0 and detected 0 issues on this pull request.

The test coverage on the diff in this pull request is 100.0% (50% is the threshold).

This pull request will bring the total coverage in the repository to 82.2% (0.0% change).

View more on Code Climate.