Skip to content

Commit 688315c

Browse files
committed
Update deps
1 parent 3076823 commit 688315c

12 files changed

+59
-42
lines changed

.github/workflows/golangci-lint.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
uses: golangci/[email protected]
1818
with:
1919
# Required: the version of golangci-lint is required and must be specified without patch version: we always use the latest patch version.
20-
version: v1.42.1
20+
version: v1.43.0
2121

2222
# Optional: working directory, useful for monorepos
2323
# working-directory: somedir

.golangci.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ linters:
3535
- scopelint
3636
- testpackage
3737
- wrapcheck
38+
- varnamelen
3839

3940
issues:
4041
exclude-use-default: false

confirm_test.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ func TestConfirm(t *testing.T) {
126126
Answer("\033X").
127127
Interrupted()
128128
}),
129-
expectedError: `Unexpected Escape Sequence: ['\x1b' 'X']`,
129+
expectedError: `unexpected escape sequence from terminal: ['\x1b' 'X']`,
130130
},
131131
{
132132
scenario: "input is invalid",
@@ -232,7 +232,7 @@ func TestConfirm_SurveyInterrupted(t *testing.T) {
232232
Answer("\033X").
233233
Interrupted()
234234
}),
235-
expectedError: `Unexpected Escape Sequence: ['\x1b' 'X']`,
235+
expectedError: `unexpected escape sequence from terminal: ['\x1b' 'X']`,
236236
},
237237
}
238238

cursor_posix.go

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
//go:build !windows
12
// +build !windows
23

34
package surveyexpect

go.mod

+8-8
Original file line numberDiff line numberDiff line change
@@ -3,23 +3,23 @@ module github.com/nhatthm/surveyexpect
33
go 1.17
44

55
require (
6-
github.com/AlecAivazis/survey/v2 v2.3.1
7-
github.com/Netflix/go-expect v0.0.0-20210722184520-ef0bf57d82b3
6+
github.com/AlecAivazis/survey/v2 v2.3.2
7+
github.com/Netflix/go-expect v0.0.0-20211003183012-e1a7c020ce25
88
github.com/hinshun/vt10x v0.0.0-20180809195222-d55458df857c
99
github.com/stretchr/testify v1.7.0
1010
)
1111

1212
require (
13-
github.com/creack/pty v1.1.15 // indirect
13+
github.com/creack/pty v1.1.17 // indirect
1414
github.com/davecgh/go-spew v1.1.1 // indirect
1515
github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 // indirect
1616
github.com/kr/pty v1.1.8 // indirect
17-
github.com/mattn/go-colorable v0.1.8 // indirect
18-
github.com/mattn/go-isatty v0.0.13 // indirect
17+
github.com/mattn/go-colorable v0.1.11 // indirect
18+
github.com/mattn/go-isatty v0.0.14 // indirect
1919
github.com/mgutz/ansi v0.0.0-20200706080929-d51e80ef957d // indirect
2020
github.com/pmezard/go-difflib v1.0.0 // indirect
21-
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68 // indirect
22-
golang.org/x/term v0.0.0-20210503060354-a79de5458b56 // indirect
23-
golang.org/x/text v0.3.3 // indirect
21+
golang.org/x/sys v0.0.0-20211117180635-dee7805ff2e1 // indirect
22+
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 // indirect
23+
golang.org/x/text v0.3.7 // indirect
2424
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect
2525
)

go.sum

+19-21
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
github.com/AlecAivazis/survey/v2 v2.3.1 h1:lzkuHA60pER7L4eYL8qQJor4bUWlJe4V0gqAT19tdOA=
2-
github.com/AlecAivazis/survey/v2 v2.3.1/go.mod h1:TH2kPCDU3Kqq7pLbnCWwZXDBjnhZtmsCle5EiYDJ2fg=
1+
github.com/AlecAivazis/survey/v2 v2.3.2 h1:TqTB+aDDCLYhf9/bD2TwSO8u8jDSmMUd2SUVO4gCnU8=
2+
github.com/AlecAivazis/survey/v2 v2.3.2/go.mod h1:TH2kPCDU3Kqq7pLbnCWwZXDBjnhZtmsCle5EiYDJ2fg=
33
github.com/Netflix/go-expect v0.0.0-20180615182759-c93bf25de8e8/go.mod h1:oX5x61PbNXchhh0oikYAH+4Pcfw5LKv21+Jnpr6r6Pc=
4-
github.com/Netflix/go-expect v0.0.0-20210722184520-ef0bf57d82b3 h1:DM0Olh3jQEm4gVPLF0mI49+fm1+M1fXDtumX/fN/G4A=
5-
github.com/Netflix/go-expect v0.0.0-20210722184520-ef0bf57d82b3/go.mod h1:68ORG0HSEWDuH5Eh73AFbYWZ1zT4Y+b0vhOa+vZRUdI=
4+
github.com/Netflix/go-expect v0.0.0-20211003183012-e1a7c020ce25 h1:hWfsqBaNZUHztXA78g7Y2Jj3rDQaTCZhhFwz43i2VlA=
5+
github.com/Netflix/go-expect v0.0.0-20211003183012-e1a7c020ce25/go.mod h1:68ORG0HSEWDuH5Eh73AFbYWZ1zT4Y+b0vhOa+vZRUdI=
66
github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY=
7-
github.com/creack/pty v1.1.15 h1:cKRCLMj3Ddm54bKSpemfQ8AtYFBhAI2MPmdys22fBdc=
8-
github.com/creack/pty v1.1.15/go.mod h1:MOBLtS5ELjhRRrroQr9kyvTxUAFNvYEK993ew/Vr4O4=
7+
github.com/creack/pty v1.1.17 h1:QeVUsEDNrLBW4tMgZHvxy18sKtr6VI492kBhUfhDJNI=
8+
github.com/creack/pty v1.1.17/go.mod h1:MOBLtS5ELjhRRrroQr9kyvTxUAFNvYEK993ew/Vr4O4=
99
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
1010
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
1111
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
@@ -15,20 +15,15 @@ github.com/hinshun/vt10x v0.0.0-20180809195222-d55458df857c/go.mod h1:DqJ97dSdRW
1515
github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 h1:Z9n2FFNUXsshfwJMBgNA0RU6/i7WVaAegv3PtuIHPMs=
1616
github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51/go.mod h1:CzGEWj7cYgsdH8dAjBGEr58BoE7ScuLd+fwFZ44+/x8=
1717
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
18-
github.com/kr/pty v1.1.4 h1:5Myjjh3JY/NaAi4IsUbHADytDyl1VE1Y9PXDlL+P/VQ=
1918
github.com/kr/pty v1.1.4/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
2019
github.com/kr/pty v1.1.8 h1:AkaSdXYQOWeaO3neb8EM634ahkXXe3jYbVh/F9lq+GI=
2120
github.com/kr/pty v1.1.8/go.mod h1:O1sed60cT9XZ5uDucP5qwvh+TE3NnUj51EiZO/lmSfw=
22-
github.com/mattn/go-colorable v0.1.2 h1:/bC9yWikZXAL9uJdulbSfyVNIR3n3trXl+v8+1sx8mU=
2321
github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE=
24-
github.com/mattn/go-colorable v0.1.8 h1:c1ghPdyEDarC70ftn0y+A/Ee++9zz8ljHG1b13eJ0s8=
25-
github.com/mattn/go-colorable v0.1.8/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc=
26-
github.com/mattn/go-isatty v0.0.8 h1:HLtExJ+uU2HOZ+wI0Tt5DtUDrx8yhUqDcp7fYERX4CE=
22+
github.com/mattn/go-colorable v0.1.11 h1:nQ+aFkoE2TMGc0b68U2OKSexC+eq46+XwZzWXHRmPYs=
23+
github.com/mattn/go-colorable v0.1.11/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4=
2724
github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s=
28-
github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU=
29-
github.com/mattn/go-isatty v0.0.13 h1:qdl+GuBjcsKKDco5BsxPJlId98mSWNKqYA+Co0SC1yA=
30-
github.com/mattn/go-isatty v0.0.13/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU=
31-
github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b h1:j7+1HpAFS1zy5+Q4qx1fWh90gTKwiN4QCGoY9TWyyO4=
25+
github.com/mattn/go-isatty v0.0.14 h1:yVuAays6BHfxijgZPzw+3Zlu5yQgKGP2/hcQbHb7S9Y=
26+
github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94=
3227
github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b/go.mod h1:01TrycV0kFyexm33Z7vhZRXopbI8J3TDReVlkTgMUxE=
3328
github.com/mgutz/ansi v0.0.0-20200706080929-d51e80ef957d h1:5PJl274Y63IEHC+7izoQE9x6ikvDFZS2mDVS3drnohI=
3429
github.com/mgutz/ansi v0.0.0-20200706080929-d51e80ef957d/go.mod h1:01TrycV0kFyexm33Z7vhZRXopbI8J3TDReVlkTgMUxE=
@@ -46,19 +41,22 @@ golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn
4641
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
4742
golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
4843
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
49-
golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
50-
golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
51-
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68 h1:nxC68pudNYkKU6jWhgrqdreuFiOQWj1Fs7T3VrH4Pjw=
5244
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
53-
golang.org/x/term v0.0.0-20210503060354-a79de5458b56 h1:b8jxX3zqjpqb2LklXPzKSGJhzyxCOZSz8ncv8Nv+y7w=
45+
golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
46+
golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
47+
golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
48+
golang.org/x/sys v0.0.0-20211117180635-dee7805ff2e1 h1:kwrAHlwJ0DUBZwQ238v+Uod/3eZ8B2K5rYsUHBQvzmI=
49+
golang.org/x/sys v0.0.0-20211117180635-dee7805ff2e1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
5450
golang.org/x/term v0.0.0-20210503060354-a79de5458b56/go.mod h1:tfny5GFUkzUvx4ps4ajbZsCe5lw1metzhBm9T3x7oIY=
51+
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 h1:JGgROgKl9N8DuW20oFS5gxc+lE67/N3FcwmBPMe7ArY=
52+
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
5553
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
56-
golang.org/x/text v0.3.3 h1:cokOdA+Jmi5PJGXLlLllQSgYigAEfHXJAERHVMaCc2k=
5754
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
55+
golang.org/x/text v0.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk=
56+
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
5857
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
5958
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
6059
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
61-
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo=
6260
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
6361
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b h1:h8qDotaEPuJATrMmW04NCwg7v22aHH28wwpauUhK9Oo=
6462
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=

input_test.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ func TestInputPrompt(t *testing.T) {
115115
Interrupted()
116116
}),
117117
message: "Enter a username:",
118-
expectedError: `Unexpected Escape Sequence: ['\x1b' 'X']`,
118+
expectedError: `unexpected escape sequence from terminal: ['\x1b' 'X']`,
119119
},
120120
{
121121
scenario: "answer is required",
@@ -219,7 +219,7 @@ func TestInputPrompt_SurveyInterrupted(t *testing.T) {
219219
Answer("\033X").
220220
Interrupted()
221221
}),
222-
expectedError: `Unexpected Escape Sequence: ['\x1b' 'X']`,
222+
expectedError: `unexpected escape sequence from terminal: ['\x1b' 'X']`,
223223
},
224224
}
225225

main/main.go

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
package main
2+
3+
import (
4+
"fmt"
5+
6+
"github.com/AlecAivazis/survey/v2"
7+
)
8+
9+
func main() {
10+
p := &survey.Select{Message: "Select a country", Options: []string{"Germany", "Vietnam"}}
11+
12+
var answer string
13+
14+
err := survey.AskOne(p, &answer)
15+
16+
fmt.Println(err)
17+
}

multiline_test.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ func TestMultilinePrompt(t *testing.T) {
5252
Answer("\033X").
5353
Interrupted()
5454
}),
55-
expectedError: `Unexpected Escape Sequence: ['\x1b' 'X']`,
55+
expectedError: `unexpected escape sequence from terminal: ['\x1b' 'X']`,
5656
},
5757
{
5858
scenario: "answer is required",
@@ -122,7 +122,7 @@ func TestMultilinePrompt_SurveyInterrupted(t *testing.T) {
122122
Answer("\033X").
123123
Interrupted()
124124
}),
125-
expectedError: `Unexpected Escape Sequence: ['\x1b' 'X']`,
125+
expectedError: `unexpected escape sequence from terminal: ['\x1b' 'X']`,
126126
},
127127
}
128128

multiselect_test.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ func TestMultiSelectPrompt(t *testing.T) {
6666
s.ExpectMultiSelect("Select destinations").
6767
Type("\033X")
6868
}),
69-
expectedError: `Unexpected Escape Sequence: ['\x1b' 'X']`,
69+
expectedError: `unexpected escape sequence from terminal: ['\x1b' 'X']`,
7070
},
7171
{
7272
scenario: "navigation",
@@ -231,7 +231,7 @@ func TestMultiSelectPrompt_SurveyInterrupted(t *testing.T) {
231231
s.ExpectMultiSelect("Select destinations").
232232
Type("\033X")
233233
}),
234-
expectedError: `Unexpected Escape Sequence: ['\x1b' 'X']`,
234+
expectedError: `unexpected escape sequence from terminal: ['\x1b' 'X']`,
235235
},
236236
}
237237

password_test.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ func TestPasswordPrompt(t *testing.T) {
115115
Interrupted()
116116
}),
117117
message: "Enter a password:",
118-
expectedError: `Unexpected Escape Sequence: ['\x1b' 'X']`,
118+
expectedError: `unexpected escape sequence from terminal: ['\x1b' 'X']`,
119119
},
120120
{
121121
scenario: "answer is required",
@@ -219,7 +219,7 @@ func TestPasswordPrompt_SurveyInterrupted(t *testing.T) {
219219
Answer("\033X").
220220
Interrupted()
221221
}),
222-
expectedError: `Unexpected Escape Sequence: ['\x1b' 'X']`,
222+
expectedError: `unexpected escape sequence from terminal: ['\x1b' 'X']`,
223223
},
224224
}
225225

select_test.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ func TestSelectPrompt(t *testing.T) {
6666
s.ExpectSelect("Select a country").
6767
Type("\033X")
6868
}),
69-
expectedError: `Unexpected Escape Sequence: ['\x1b' 'X']`,
69+
expectedError: `unexpected escape sequence from terminal: ['\x1b' 'X']`,
7070
},
7171
{
7272
scenario: "navigation",
@@ -208,7 +208,7 @@ func TestSelectPrompt_SurveyInterrupted(t *testing.T) {
208208
s.ExpectSelect("Select a country").
209209
Type("\033X")
210210
}),
211-
expectedError: `Unexpected Escape Sequence: ['\x1b' 'X']`,
211+
expectedError: `unexpected escape sequence from terminal: ['\x1b' 'X']`,
212212
},
213213
}
214214

0 commit comments

Comments
 (0)