Removing un-used variables and fixing an error condition (#4737)

This commit is contained in:
Sveinn
2023-10-30 08:43:44 -07:00
committed by GitHub
parent 01df0ff497
commit b82f6c60b2
3 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -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
}
+2 -2
View File
@@ -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
}
+1 -1
View File
@@ -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)
}