From 6051cf8b427af5637bab553fcebbfe053581e68e Mon Sep 17 00:00:00 2001 From: Nurzhan Saktaganov Date: Fri, 20 Sep 2024 01:02:44 +0300 Subject: [PATCH] review fixes for #407 (2) --- example_test.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/example_test.go b/example_test.go index a76d9b1b4..d4480cea4 100644 --- a/example_test.go +++ b/example_test.go @@ -4,6 +4,7 @@ import ( "context" "fmt" "net" + "regexp" "time" "github.com/tarantool/go-iproto" @@ -163,10 +164,10 @@ func ExamplePingRequest_Context() { // Ping a Tarantool instance to check connection. data, err := conn.Do(req).Get() fmt.Println("Ping Resp data", data) - fmt.Println("Ping Error", contextDoneErrRegexp.Match([]byte(err.Error()))) + fmt.Println("Ping Error", regexp.MustCompile("[0-9]+").ReplaceAllString(err.Error(), "N")) // Output: // Ping Resp data [] - // Ping Error true + // Ping Error context is done (request ID N) } func ExampleSelectRequest() {