mirror of
https://github.com/rclone/rclone.git
synced 2025-04-19 01:59:00 +08:00
Fix linter complaints - basically comments
This commit is contained in:
parent
5ce316256e
commit
e39d0e99f2
@ -6,9 +6,9 @@ import (
|
||||
)
|
||||
|
||||
var (
|
||||
// ErrChuckSize is returned when the chunk size is zero
|
||||
// ErrChunkSize is returned when the chunk size is zero
|
||||
ErrChunkSize = errors.New("tus chunk size must be greater than zero")
|
||||
// ErrNilConfig is returned when the logger is nil
|
||||
// ErrNilLogger is returned when the logger is nil
|
||||
ErrNilLogger = errors.New("tus logger can't be nil")
|
||||
// ErrNilStore is returned when the store is nil
|
||||
ErrNilStore = errors.New("tus store can't be nil if resume is enable")
|
||||
|
@ -40,9 +40,9 @@ func (f *Fs) shouldRetryChunk(ctx context.Context, resp *http.Response, err erro
|
||||
if off, err := strconv.ParseInt(resp.Header.Get("Upload-Offset"), 10, 64); err == nil {
|
||||
*newOff = off
|
||||
return false, nil
|
||||
} else {
|
||||
return false, err
|
||||
}
|
||||
return false, err
|
||||
|
||||
case 409:
|
||||
return false, ErrOffsetMismatch
|
||||
case 412:
|
||||
|
@ -17,12 +17,6 @@ import (
|
||||
"github.com/rclone/rclone/lib/rest"
|
||||
)
|
||||
|
||||
// set the chunk size for testing
|
||||
func (f *Fs) setUploadTusSize(cs fs.SizeSuffix) (old fs.SizeSuffix, err error) {
|
||||
old, f.opt.ChunkSize = f.opt.ChunkSize, cs
|
||||
return
|
||||
}
|
||||
|
||||
func (o *Object) updateViaTus(ctx context.Context, in io.Reader, contentType string, src fs.ObjectInfo, options ...fs.OpenOption) (err error) {
|
||||
|
||||
fn := filepath.Base(src.Remote())
|
||||
|
Loading…
x
Reference in New Issue
Block a user