mirror of
				https://github.com/containers/podman.git
				synced 2025-10-31 01:50:50 +08:00 
			
		
		
		
	 31112e4b08
			
		
	
	31112e4b08
	
	
	
		
			
			To help with packaging, the handlers in pkg/api/handlers are now found in pkg/api/handler/compat. Signed-off-by: Jhon Honce <jhonce@redhat.com>
		
			
				
	
	
		
			15 lines
		
	
	
		
			200 B
		
	
	
	
		
			Go
		
	
	
	
	
	
			
		
		
	
	
			15 lines
		
	
	
		
			200 B
		
	
	
	
		
			Go
		
	
	
	
	
	
| package compat
 | |
| 
 | |
| import (
 | |
| 	"io"
 | |
| 	"net/http"
 | |
| 	"os"
 | |
| )
 | |
| 
 | |
| func SaveFromBody(f *os.File, r *http.Request) error { // nolint
 | |
| 	if _, err := io.Copy(f, r.Body); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	return f.Close()
 | |
| }
 |