Skip to content

Commit 7946189

Browse files
committed
update
1 parent df58d0e commit 7946189

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

cmd/telnet.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,9 +77,9 @@ jmstool telnet [email protected] -p 23 -P 1212
7777
if xterm == "" {
7878
xterm = "xterm-256color"
7979
}
80-
successRex := regexp.MustCompile(tclientlib.DefaultSuccessRegs)
80+
var customSuccess *regexp.Regexp
8181
if custom != "" {
82-
successRex = regexp.MustCompile(custom)
82+
customSuccess = regexp.MustCompile(custom)
8383
}
8484

8585
fd := int(os.Stdin.Fd())
@@ -93,7 +93,7 @@ jmstool telnet [email protected] -p 23 -P 1212
9393
High: h,
9494
TermType: xterm,
9595
},
96-
LoginSuccessRegex: successRex,
96+
CustomSuccessRegex: customSuccess,
9797
}
9898
tclientlib.SetMode(tclientlib.DebugMode)
9999
client, err := tclientlib.Dial("tcp", net.JoinHostPort(host, port), &conf)

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ module github.com/LeeEirc/jmstool
33
go 1.14
44

55
require (
6-
github.com/LeeEirc/tclientlib v0.0.0-20201202164628-16a0cf48e7d0
6+
github.com/LeeEirc/tclientlib v0.0.0-20201203031752-f06d4260f891
77
github.com/mitchellh/go-homedir v1.1.0
88
github.com/spf13/cobra v1.0.0
99
github.com/spf13/viper v1.6.3

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
22
github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ=
33
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
4-
github.com/LeeEirc/tclientlib v0.0.0-20201202164628-16a0cf48e7d0 h1:WZWMarivTtYv3TojmRtVfvi44iF8Ahd/km5x+RwQu00=
5-
github.com/LeeEirc/tclientlib v0.0.0-20201202164628-16a0cf48e7d0/go.mod h1:RXNdd9nSPEKoFc9Avnd6Yx73AfhQNSAHL2O11a5m864=
4+
github.com/LeeEirc/tclientlib v0.0.0-20201203031752-f06d4260f891 h1:x7pJV1+3JmfEEd92FPcLZxluqKvknEz1ww58m9yTKo4=
5+
github.com/LeeEirc/tclientlib v0.0.0-20201203031752-f06d4260f891/go.mod h1:RXNdd9nSPEKoFc9Avnd6Yx73AfhQNSAHL2O11a5m864=
66
github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU=
77
github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc=
88
github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0=

0 commit comments

Comments
 (0)