Skip to content

Pass body bytes directly to avoid copying in GitLab client

Mikhail Mazurskiy requested to merge ash2k/support-body-bytes into master

We use the https://github.com/hashicorp/go-retryablehttp library to retry GitLab API calls automatically. When given a io.Reader, it eagerly reads it into a []byte anyway. So, no point in constructing a reader from []byte that we have in all but one place. Just pass []byte directly.

Merge request reports

Loading