MCPcopy
hub / github.com/minio/minio-go / errUnexpectedEOF

Function errUnexpectedEOF

api-error-response.go:265–274  ·  view source on GitHub ↗

errUnexpectedEOF - Unexpected end of file reached.

(totalRead, totalSize int64, bucketName, objectName string)

Source from the content-addressed store, hash-verified

263
264// errUnexpectedEOF - Unexpected end of file reached.
265func errUnexpectedEOF(totalRead, totalSize int64, bucketName, objectName string) error {
266 msg := fmt.Sprintf("Data read ‘%d’ is not equal to the size ‘%d’ of the input Reader.", totalRead, totalSize)
267 return ErrorResponse{
268 StatusCode: http.StatusBadRequest,
269 Code: UnexpectedEOF,
270 Message: msg,
271 BucketName: bucketName,
272 Key: objectName,
273 }
274}
275
276// errInvalidArgument - Invalid argument response.
277func errInvalidArgument(message string) error {

Calls

no outgoing calls

Tested by 1

TestErrUnexpectedEOFFunction · 0.68