diff --git a/cmd/client-fs.go b/cmd/client-fs.go index 690af68ad6..f36a4d2810 100644 --- a/cmd/client-fs.go +++ b/cmd/client-fs.go @@ -881,7 +881,7 @@ func (f *fsClient) listInRoutine(contentCh chan<- *ClientContent) { switch fst.Mode().IsDir() { case true: files, e := readDir(fpath) - if err != nil { + if e != nil { contentCh <- &ClientContent{Err: probe.NewError(e)} return } diff --git a/cmd/cp-url.go b/cmd/cp-url.go index 6c0196e055..cdf363c321 100644 --- a/cmd/cp-url.go +++ b/cmd/cp-url.go @@ -285,7 +285,7 @@ func prepareCopyURLsTypeD(ctx context.Context, cc copyURLsContent, o prepareCopy } }(ctx, cc, o) - go func(ctx context.Context, cc copyURLsContent, o prepareCopyURLsOpts) { + go func() { defer close(copyURLsCh) filter := make(map[string]struct{}) for cpURLs := range copyURLsFilterCh { @@ -301,7 +301,7 @@ func prepareCopyURLsTypeD(ctx context.Context, cc copyURLsContent, o prepareCopy copyURLsCh <- cpURLs } } - }(ctx, cc, o) + }() return copyURLsCh } diff --git a/cmd/tofu.go b/cmd/tofu.go index 817a4456d4..73f42d6a62 100644 --- a/cmd/tofu.go +++ b/cmd/tofu.go @@ -102,7 +102,7 @@ func promptTrustSelfSignedCert(ctx context.Context, endpoint, alias string) (*x5 return nil, nil } - if te != nil && !strings.Contains(te.Error(), "certificate signed by unknown authority") && + if !strings.Contains(te.Error(), "certificate signed by unknown authority") && !strings.Contains(te.Error(), "certificate is not trusted") /* darwin specific error message */ { return nil, probe.NewError(te) }