Fix NPE panic in ACI client
resp is nil when `Do()` has an error. Also seems there was some gofmt issues in the file.
This commit is contained in:
@@ -42,7 +42,7 @@ func (c *Client) GetContainerGroup(ctx context.Context, resourceGroup, container
|
||||
// Send the request.
|
||||
resp, err := c.hc.Do(req)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("Sending get container group request failed: %v", err), &resp.StatusCode
|
||||
return nil, fmt.Errorf("Sending get container group request failed: %v", err), nil
|
||||
}
|
||||
defer resp.Body.Close()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user