mirror of https://github.com/docker/compose.git
				
				
				
			Fixed possible `nil` pointer dereference
Signed-off-by: Alexandr Hacicheant <a.hacicheant@gmail.com>
This commit is contained in:
		
							parent
							
								
									c6a76b9bd7
								
							
						
					
					
						commit
						16652ed26a
					
				| 
						 | 
				
			
			@ -166,10 +166,10 @@ type CreateFileShareResponse struct {
 | 
			
		|||
func (c *Client) CreateFileShare(ctx context.Context, r CreateFileShareRequest) (*CreateFileShareResponse, error) {
 | 
			
		||||
	rawBody, _ := json.Marshal(r)
 | 
			
		||||
	req, err := http.NewRequestWithContext(ctx, http.MethodPost, backendURL("/mutagen/file-shares"), bytes.NewReader(rawBody))
 | 
			
		||||
	req.Header.Set("Content-Type", "application/json")
 | 
			
		||||
	if err != nil {
 | 
			
		||||
		return nil, err
 | 
			
		||||
	}
 | 
			
		||||
	req.Header.Set("Content-Type", "application/json")
 | 
			
		||||
	resp, err := c.client.Do(req)
 | 
			
		||||
	if err != nil {
 | 
			
		||||
		return nil, err
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue