mirror of
https://github.com/gfleury/go-bitbucket-v1.git
synced 2025-04-04 17:00:12 -05:00
Fixes
This commit is contained in:
parent
e0ef906417
commit
3d427fc798
@ -9,7 +9,6 @@ import (
|
|||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
"io"
|
"io"
|
||||||
"io/ioutil"
|
|
||||||
"net/url"
|
"net/url"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
@ -3369,7 +3368,7 @@ func (a *DefaultApiService) GetArchive(project, repository string, localVarOptio
|
|||||||
}
|
}
|
||||||
defer localVarHTTPResponse.Body.Close()
|
defer localVarHTTPResponse.Body.Close()
|
||||||
if localVarHTTPResponse.StatusCode >= 300 {
|
if localVarHTTPResponse.StatusCode >= 300 {
|
||||||
bodyBytes, _ := ioutil.ReadAll(localVarHTTPResponse.Body)
|
bodyBytes, _ := io.ReadAll(localVarHTTPResponse.Body)
|
||||||
return 0, reportError("Status: %v, Body: %s", localVarHTTPResponse.Status, bodyBytes)
|
return 0, reportError("Status: %v, Body: %s", localVarHTTPResponse.Status, bodyBytes)
|
||||||
}
|
}
|
||||||
return io.Copy(writer, localVarHTTPResponse.Body)
|
return io.Copy(writer, localVarHTTPResponse.Body)
|
||||||
@ -4662,7 +4661,7 @@ func (a *DefaultApiService) GetRawContent(projectKey, repositorySlug, path strin
|
|||||||
}
|
}
|
||||||
|
|
||||||
result := NewAPIResponse(localVarHTTPResponse)
|
result := NewAPIResponse(localVarHTTPResponse)
|
||||||
result.Payload, err = ioutil.ReadAll(localVarHTTPResponse.Body)
|
result.Payload, err = io.ReadAll(localVarHTTPResponse.Body)
|
||||||
return result, err
|
return result, err
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -8340,7 +8339,7 @@ func (a *DefaultApiService) GetSSHRepoKeys(projectKey, repositorySlug, sshKeyFil
|
|||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
defer localVarHTTPResponse.Body.Close()
|
defer localVarHTTPResponse.Body.Close()
|
||||||
bodyBytes, _ := ioutil.ReadAll(localVarHTTPResponse.Body)
|
bodyBytes, _ := io.ReadAll(localVarHTTPResponse.Body)
|
||||||
|
|
||||||
if localVarHTTPResponse.StatusCode >= 300 {
|
if localVarHTTPResponse.StatusCode >= 300 {
|
||||||
return nil, errors.New(fmt.Sprintf("Error reading %s: %s", localVarPath, localVarHTTPResponse.Status))
|
return nil, errors.New(fmt.Sprintf("Error reading %s: %s", localVarPath, localVarHTTPResponse.Status))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user