Skip to content

Commit 4fe3e4c

Browse files
authored
Update survey code, remove tabs from help messages which caused the survey to repeat itself when ? was pressed (#4)
1 parent 904528e commit 4fe3e4c

File tree

3 files changed

+11
-9
lines changed

3 files changed

+11
-9
lines changed

cmd/node.go

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -201,10 +201,10 @@ func qInterfaces() *survey.Question {
201201
Name: "interfaces",
202202
Prompt: &survey.MultiSelect{
203203
Message: "Choose your capture interface(s):",
204-
Help: `The interfaces you most likely want to use for capturing start
205-
with "eth" or "en" (e.g. eth0, eno1, enp1s0, enx78e7d1ea46da). You will generally NOT
206-
want to use loopback, bridged, or virtual interfaces (e.g. lo, br-c446eb08dde, veth582437d).
207-
If you choose to select interfaces belonging to the latter category, proceed at your own risk.`,
204+
Help: `The interfaces you most likely want to use for capturing start
205+
with "eth" or "en" (e.g. eth0, eno1, enp1s0, enx78e7d1ea46da). You will generally NOT
206+
want to use loopback, bridged, or virtual interfaces (e.g. lo, br-c446eb08dde, veth582437d).
207+
If you choose to select interfaces belonging to the latter category, proceed at your own risk.`,
208208
Options: displayNames,
209209
Default: suggestedNames,
210210
PageSize: 20,
@@ -229,8 +229,8 @@ func qProcesses() *survey.Question {
229229
Prompt: &survey.Input{
230230
Message: "How many total Zeek processes do you want?",
231231
Help: `You will generally get the best performance by making your total number of Zeek processes
232-
one less than the number of CPU cores your system has. If your system is used for something
233-
in addition to Zeek you may want to reduce the number of processes further.`,
232+
one less than the number of CPU cores your system has. If your system is used for something
233+
in addition to Zeek you may want to reduce the number of processes further.`,
234234
Default: strconv.Itoa(int(suggestedProcesses())),
235235
},
236236
// Only numbers up to how many cores there are
@@ -250,8 +250,8 @@ func qSocketType() *survey.Question {
250250
Name: "socketType",
251251
Prompt: &survey.Select{
252252
Message: "What type of network socket do you want to use?",
253-
Help: `Choosing the afpacket option here can improve performance. However, you must have
254-
the corresponding zeek plugin to use it.`,
253+
Help: `Choosing the afpacket option here can improve performance. However, you must have
254+
the corresponding zeek plugin to use it.`,
255255
Options: []string{sockRaw, sockAfpacket},
256256
Default: sockRaw,
257257
},

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@ require (
1111
golang.org/x/text v0.3.2 // indirect
1212
)
1313

14-
replace github.com/AlecAivazis/survey/v2 => github.com/Zalgo2462/survey/v2 v2.0.8-0.20200624020207-2d2e06c55d31
14+
replace github.com/AlecAivazis/survey/v2 => github.com/Zalgo2462/survey/v2 v2.0.8-0.20200625180604-93e08bfe2dd3

go.sum

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ github.com/Netflix/go-expect v0.0.0-20180615182759-c93bf25de8e8/go.mod h1:oX5x61
55
github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU=
66
github.com/Zalgo2462/survey/v2 v2.0.8-0.20200624020207-2d2e06c55d31 h1:pLBCGnkuRkjvcRR2GzhF2YDzuBdU8y38Qxee0mT+94w=
77
github.com/Zalgo2462/survey/v2 v2.0.8-0.20200624020207-2d2e06c55d31/go.mod h1:9FJRdMdDm8rnT+zHVbvQT2RTSTLq0Ttd6q3Vl2fahjk=
8+
github.com/Zalgo2462/survey/v2 v2.0.8-0.20200625180604-93e08bfe2dd3 h1:6hO/HmknGRCSlv3wNET8VCKbf9uVi5cNJdsdOjkCTDg=
9+
github.com/Zalgo2462/survey/v2 v2.0.8-0.20200625180604-93e08bfe2dd3/go.mod h1:9FJRdMdDm8rnT+zHVbvQT2RTSTLq0Ttd6q3Vl2fahjk=
810
github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc=
911
github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0=
1012
github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8=

0 commit comments

Comments
 (0)