From 3a351fa9043dbdb3b7c742f38919a6e1953a3161 Mon Sep 17 00:00:00 2001 From: Vladyslav Moisieienkov Date: Fri, 17 Nov 2023 19:12:14 +0100 Subject: [PATCH] Fix import error in Writer code example in README (#1234) Fixes #1231 --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 304c1603b..e17878825 100644 --- a/README.md +++ b/README.md @@ -401,7 +401,7 @@ for i := 0; i < retries; i++ { // attempt to create topic prior to publishing the message err = w.WriteMessages(ctx, messages...) - if errors.Is(err, LeaderNotAvailable) || errors.Is(err, context.DeadlineExceeded) { + if errors.Is(err, kafka.LeaderNotAvailable) || errors.Is(err, context.DeadlineExceeded) { time.Sleep(time.Millisecond * 250) continue }