mirror of
https://github.com/rclone/rclone.git
synced 2024-11-22 05:28:09 +08:00
build: fix gosimple lint errors with golangci-lint v1.60.1
This commit is contained in:
parent
8d1d096c11
commit
9d5315a944
|
@ -987,7 +987,7 @@ func (f *Fs) scanObject(ctx context.Context, remote string, quickScan bool) (fs.
|
|||
}
|
||||
}
|
||||
|
||||
if o.main == nil && (o.chunks == nil || len(o.chunks) == 0) {
|
||||
if o.main == nil && len(o.chunks) == 0 {
|
||||
// Scanning hasn't found data chunks with conforming names.
|
||||
if f.useMeta || quickScan {
|
||||
// Metadata is required but absent and there are no chunks.
|
||||
|
|
|
@ -62,7 +62,7 @@ func getAuthorizationToken(ctx context.Context, srv *rest.Client, user, password
|
|||
// This is only going to be http errors here
|
||||
return "", fmt.Errorf("failed to authenticate: %w", err)
|
||||
}
|
||||
if result.Errors != nil && len(result.Errors) > 0 {
|
||||
if len(result.Errors) > 0 {
|
||||
return "", errors.New(strings.Join(result.Errors, ", "))
|
||||
}
|
||||
if result.Token == "" {
|
||||
|
|
|
@ -238,7 +238,7 @@ func (api *Client) Call(ctx context.Context, opts *Opts) (resp *http.Response, e
|
|||
return nil, errors.New("RootURL not set")
|
||||
}
|
||||
url += opts.Path
|
||||
if opts.Parameters != nil && len(opts.Parameters) > 0 {
|
||||
if len(opts.Parameters) > 0 {
|
||||
url += "?" + opts.Parameters.Encode()
|
||||
}
|
||||
body := readers.NoCloser(opts.Body)
|
||||
|
|
Loading…
Reference in New Issue
Block a user