mirror of
https://github.com/moby/moby.git
synced 2026-08-08 17:11:38 +00:00
full diff: https://github.com/moby/buildkit/compare/d1e5d1a8f771...v0.27.0-rc1 Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
23 lines
445 B
Go
23 lines
445 B
Go
// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers
|
|
// SPDX-License-Identifier: Apache-2.0
|
|
|
|
package fileutils
|
|
|
|
import "mime/multipart"
|
|
|
|
// File represents an uploaded file.
|
|
type File struct {
|
|
Data multipart.File
|
|
Header *multipart.FileHeader
|
|
}
|
|
|
|
// Read bytes from the file
|
|
func (f *File) Read(p []byte) (n int, err error) {
|
|
return f.Data.Read(p)
|
|
}
|
|
|
|
// Close the file
|
|
func (f *File) Close() error {
|
|
return f.Data.Close()
|
|
}
|