mirror of
https://github.com/rclone/rclone.git
synced 2026-01-06 10:33:34 +00:00
Error strings should not be capitalized
Reported by staticcheck 2022.1.2 (v0.3.2) See: staticcheck.io
This commit is contained in:
@@ -474,7 +474,7 @@ func (f *Fs) updateFileInformation(ctx context.Context, update *api.UpdateFileIn
|
||||
|
||||
func (f *Fs) putUnchecked(ctx context.Context, in io.Reader, remote string, size int64, options ...fs.OpenOption) (fs.Object, error) {
|
||||
if size > int64(200e9) { // max size 200GB
|
||||
return nil, errors.New("File too big, cant upload")
|
||||
return nil, errors.New("file too big, can't upload")
|
||||
} else if size == 0 {
|
||||
return nil, fs.ErrorCantUploadEmptyFiles
|
||||
}
|
||||
@@ -497,7 +497,7 @@ func (f *Fs) putUnchecked(ctx context.Context, in io.Reader, remote string, size
|
||||
return nil, err
|
||||
}
|
||||
if info.StatusCode != 0 {
|
||||
return nil, fmt.Errorf("putUnchecked: api error: %d - %s", info.StatusCode, info.Message)
|
||||
return nil, fmt.Errorf("putUnchecked api error: %d - %s", info.StatusCode, info.Message)
|
||||
}
|
||||
// we need to have a safe name for the upload to work
|
||||
tmpName := "rcloneTemp" + random.String(8)
|
||||
@@ -506,7 +506,7 @@ func (f *Fs) putUnchecked(ctx context.Context, in io.Reader, remote string, size
|
||||
return nil, err
|
||||
}
|
||||
if len(upload.Files) != 1 {
|
||||
return nil, errors.New("Upload: unexpected response")
|
||||
return nil, errors.New("upload unexpected response")
|
||||
}
|
||||
match := f.IDRegexp.FindStringSubmatch(upload.Files[0].URL)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user