Skip to content

Commit 6051cf8

Browse files
review fixes for tarantool#407 (2)
1 parent e76c795 commit 6051cf8

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

example_test.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import (
44
"context"
55
"fmt"
66
"net"
7+
"regexp"
78
"time"
89

910
"github.com/tarantool/go-iproto"
@@ -163,10 +164,10 @@ func ExamplePingRequest_Context() {
163164
// Ping a Tarantool instance to check connection.
164165
data, err := conn.Do(req).Get()
165166
fmt.Println("Ping Resp data", data)
166-
fmt.Println("Ping Error", contextDoneErrRegexp.Match([]byte(err.Error())))
167+
fmt.Println("Ping Error", regexp.MustCompile("[0-9]+").ReplaceAllString(err.Error(), "N"))
167168
// Output:
168169
// Ping Resp data []
169-
// Ping Error true
170+
// Ping Error context is done (request ID N)
170171
}
171172

172173
func ExampleSelectRequest() {

0 commit comments

Comments
 (0)