Skip to content

Commit

Permalink
Removing un-used variables and fixing an error condition (#4737)
Browse files Browse the repository at this point in the history
  • Loading branch information
zveinn authored Oct 30, 2023
1 parent 01df0ff commit b82f6c6
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion cmd/client-fs.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
4 changes: 2 additions & 2 deletions cmd/cp-url.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -301,7 +301,7 @@ func prepareCopyURLsTypeD(ctx context.Context, cc copyURLsContent, o prepareCopy
copyURLsCh <- cpURLs
}
}
}(ctx, cc, o)
}()

return copyURLsCh
}
Expand Down
2 changes: 1 addition & 1 deletion cmd/tofu.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down

0 comments on commit b82f6c6

Please sign in to comment.