jfrog / jfrog-client-go

All go clients for JFrog products
Apache License 2.0
260 stars 139 forks source link

Fix set nil for 'checkRedirect' when no value exists, tmp fix. #927

Open asafambar opened 5 months ago

asafambar commented 5 months ago
asafambar commented 5 months ago

This PR is a temp solution for data race found by go tool, it prevent the tool from failing. in curation we have many requests in parallel using the same http client, one of the struct values 'CheckRedirect' is set to nil after each request, as for the usage of the use today with the client, the value is always nil, so there is no need to write any nil value again which cause data race, For better future use of this client to have parallel requests safely (only on post requests or specific config use it) , this should not be changed after each requests but be determined on the Initialization of the client.