add func to DownloadReleaseAttachment #609

Closed
edieruby wants to merge 7 commits from edieruby/go-sdk:download.attachment into main
Showing only changes of commit 19e129e36b - Show all commits

View File

@ -223,11 +223,17 @@ func SetDebugMode() ClientOption {
func (c *Client) doWebRequest(method, path string, body io.Reader) (*Response, error) {
c.mutex.RLock()
debug := c.debug
if debug {
fmt.Printf("%s: %s\nBody: %v\n", method, c.url+path, body)
}
req, err := http.NewRequestWithContext(c.ctx, method, c.url+path, body)
Outdated
Review

L230 error need to be checked

L230 error need to be checked

add the check

add the check
if err != nil {
c.mutex.RUnlock()
return nil, err
}
client := c.client // client ref can change from this point on so safe it
c.mutex.RUnlock()