Skip to content

Commit 812fa4b

Browse files
committed
Update to go-execute v2
Signed-off-by: Alex Ellis (OpenFaaS Ltd) <[email protected]>
1 parent ca80ac6 commit 812fa4b

File tree

4 files changed

+18
-16
lines changed

4 files changed

+18
-16
lines changed

cmd/ready.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import (
66
"strings"
77
"time"
88

9-
execute "github.com/alexellis/go-execute/pkg/v1"
9+
execute "github.com/alexellis/go-execute/v2"
1010
"github.com/alexellis/k3sup/pkg"
1111
"github.com/spf13/cobra"
1212
)
@@ -74,7 +74,7 @@ func MakeReady() *cobra.Command {
7474
StreamStdio: false,
7575
}
7676

77-
res, err := task.Execute()
77+
res, err := task.Execute(cmd.Context())
7878
if err != nil {
7979
return err
8080
}

go.mod

+4-4
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,16 @@ module github.com/alexellis/k3sup
33
go 1.20
44

55
require (
6-
github.com/alexellis/go-execute v0.6.0
6+
github.com/alexellis/go-execute/v2 v2.0.0
77
github.com/mitchellh/go-homedir v1.1.0
88
github.com/morikuni/aec v1.0.0
99
github.com/spf13/cobra v1.7.0
10-
golang.org/x/crypto v0.12.0
10+
golang.org/x/crypto v0.13.0
1111
)
1212

1313
require (
1414
github.com/inconshreveable/mousetrap v1.1.0 // indirect
1515
github.com/spf13/pflag v1.0.5 // indirect
16-
golang.org/x/sys v0.11.0 // indirect
17-
golang.org/x/term v0.11.0 // indirect
16+
golang.org/x/sys v0.12.0 // indirect
17+
golang.org/x/term v0.12.0 // indirect
1818
)

go.sum

+8-8
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
github.com/alexellis/go-execute v0.6.0 h1:FVGoudJnWSObwf9qmehbvVuvhK6g1UpKOCBjS+OUXEA=
2-
github.com/alexellis/go-execute v0.6.0/go.mod h1:nlg2F6XdYydUm1xXQMMiuibQCV1mveybBkNWfdNznjk=
1+
github.com/alexellis/go-execute/v2 v2.0.0 h1:e2fB9kZcPG0yg65XHL1/t6efcCUdt32AMbr/mv7A2tc=
2+
github.com/alexellis/go-execute/v2 v2.0.0/go.mod h1:FMdRnUTiFAmYXcv23txrp3VYZfLo24nMpiIneWgKHTQ=
33
github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=
44
github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8=
55
github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw=
@@ -12,11 +12,11 @@ github.com/spf13/cobra v1.7.0 h1:hyqWnYt1ZQShIddO5kBpj3vu05/++x6tJ6dg8EC572I=
1212
github.com/spf13/cobra v1.7.0/go.mod h1:uLxZILRyS/50WlhOIKD7W6V5bgeIt+4sICxh6uRMrb0=
1313
github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA=
1414
github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
15-
golang.org/x/crypto v0.12.0 h1:tFM/ta59kqch6LlvYnPa0yx5a83cL2nHflFhYKvv9Yk=
16-
golang.org/x/crypto v0.12.0/go.mod h1:NF0Gs7EO5K4qLn+Ylc+fih8BSTeIjAP05siRnAh98yw=
17-
golang.org/x/sys v0.11.0 h1:eG7RXZHdqOJ1i+0lgLgCpSXAp6M3LYlAo6osgSi0xOM=
18-
golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
19-
golang.org/x/term v0.11.0 h1:F9tnn/DA/Im8nCwm+fX+1/eBwi4qFjRT++MhtVC4ZX0=
20-
golang.org/x/term v0.11.0/go.mod h1:zC9APTIj3jG3FdV/Ons+XE1riIZXG4aZ4GTHiPZJPIU=
15+
golang.org/x/crypto v0.13.0 h1:mvySKfSWJ+UKUii46M40LOvyWfN0s2U+46/jDd0e6Ck=
16+
golang.org/x/crypto v0.13.0/go.mod h1:y6Z2r+Rw4iayiXXAIxJIDAJ1zMW4yaTpebo8fPOliYc=
17+
golang.org/x/sys v0.12.0 h1:CM0HF96J0hcLAwsHPJZjfdNzs0gftsLfgKt57wWHJ0o=
18+
golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
19+
golang.org/x/term v0.12.0 h1:/ZfYdc3zq+q02Rv9vGqTeSItdzZTSNDmfTi0mBAuidU=
20+
golang.org/x/term v0.12.0/go.mod h1:owVbMEjm3cBLCHdkQu9b1opXd4ETQWc3BhuQGKgXgvU=
2121
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
2222
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=

pkg/operator/exec_operator.go

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
package ssh
22

33
import (
4-
goexecute "github.com/alexellis/go-execute/pkg/v1"
4+
"context"
5+
6+
goexecute "github.com/alexellis/go-execute/v2"
57
)
68

79
// ExecOperator executes commands on the local machine directly
@@ -15,7 +17,7 @@ func (ex ExecOperator) ExecuteStdio(command string, stream bool) (CommandRes, er
1517
StreamStdio: stream,
1618
}
1719

18-
res, err := task.Execute()
20+
res, err := task.Execute(context.Background())
1921
if err != nil {
2022
return CommandRes{}, err
2123
}

0 commit comments

Comments
 (0)