mirror of
https://github.com/containers/podman.git
synced 2025-05-25 19:16:59 +08:00

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()
|
|
}
|