Split layer and upload from repository
Layer upload moved to its own file with its own unit tests Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
This commit is contained in:
parent
03e0873125
commit
07cee840a4
5 changed files with 569 additions and 328 deletions
|
@ -1,7 +1,6 @@
|
|||
package client
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
|
@ -104,9 +103,8 @@ func parseHTTPErrorResponse(response *http.Response) error {
|
|||
if err != nil {
|
||||
return err
|
||||
}
|
||||
decoder := json.NewDecoder(bytes.NewReader(body))
|
||||
err = decoder.Decode(&errors)
|
||||
if err != nil {
|
||||
|
||||
if err := json.Unmarshal(body, &errors); err != nil {
|
||||
return &UnexpectedHTTPResponseError{
|
||||
ParseErr: err,
|
||||
Response: body,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue