File tree Expand file tree Collapse file tree 3 files changed +8
-13
lines changed Expand file tree Collapse file tree 3 files changed +8
-13
lines changed Original file line number Diff line number Diff line change @@ -3,15 +3,13 @@ module github.com/lima-vm/sshocker
3
3
go 1.20
4
4
5
5
require (
6
- github.com/hashicorp/go-multierror v1.1.1
7
6
github.com/pkg/sftp v1.13.5
8
7
github.com/sirupsen/logrus v1.9.3
9
8
github.com/urfave/cli/v2 v2.25.7
10
9
)
11
10
12
11
require (
13
12
github.com/cpuguy83/go-md2man/v2 v2.0.2 // indirect
14
- github.com/hashicorp/errwrap v1.1.0 // indirect
15
13
github.com/kr/fs v0.1.0 // indirect
16
14
github.com/russross/blackfriday/v2 v2.1.0 // indirect
17
15
github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673 // indirect
Original file line number Diff line number Diff line change @@ -3,11 +3,6 @@ github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46t
3
3
github.com/davecgh/go-spew v1.1.0 /go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38 =
4
4
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c =
5
5
github.com/davecgh/go-spew v1.1.1 /go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38 =
6
- github.com/hashicorp/errwrap v1.0.0 /go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4 =
7
- github.com/hashicorp/errwrap v1.1.0 h1:OxrOeh75EUXMY8TBjag2fzXGZ40LB6IKw45YeGUDY2I =
8
- github.com/hashicorp/errwrap v1.1.0 /go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4 =
9
- github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+lD48awMYo =
10
- github.com/hashicorp/go-multierror v1.1.1 /go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM =
11
6
github.com/kr/fs v0.1.0 h1:Jskdu9ieNAYnjxsi0LbQp1ulIKZV1LAFgK1tWhpZgl8 =
12
7
github.com/kr/fs v0.1.0 /go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg =
13
8
github.com/pkg/sftp v1.13.5 h1:a3RLUqkyjYRtBTZJZ1VRrKbN3zhuPLlUc3sphVz81go =
Original file line number Diff line number Diff line change 1
1
package util
2
2
3
3
import (
4
+ "errors"
4
5
"io"
5
-
6
- "github.com/hashicorp/go-multierror"
7
6
)
8
7
9
8
// RWC composes io.ReadCloser and io.WriteCloser into io.ReadWriteCloser
@@ -13,12 +12,15 @@ type RWC struct {
13
12
}
14
13
15
14
func (rwc * RWC ) Close () error {
16
- var merr * multierror. Error
15
+ var merr error
17
16
if err := rwc .ReadCloser .Close (); err != nil {
18
- merr = multierror . Append (merr , err )
17
+ merr = errors . Join (merr , err )
19
18
}
20
19
if err := rwc .WriteCloser .Close (); err != nil {
21
- merr = multierror .Append (merr , err )
20
+ merr = errors .Join (merr , err )
21
+ }
22
+ if merr != nil {
23
+ return merr
22
24
}
23
- return merr . ErrorOrNil ()
25
+ return nil
24
26
}
You can’t perform that action at this time.
0 commit comments