From f72dfeef32a0c9239d3a6c3d69ab2c3cdee918df Mon Sep 17 00:00:00 2001 From: pantafive <56078241+pantafive@users.noreply.github.com> Date: Tue, 15 Nov 2022 19:36:25 +0100 Subject: [PATCH] update gotest.md - fix errors in the example (#623) --- docs/quickstart/gotest.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/docs/quickstart/gotest.md b/docs/quickstart/gotest.md index d5c0451423..2c2cb11b03 100644 --- a/docs/quickstart/gotest.md +++ b/docs/quickstart/gotest.md @@ -17,6 +17,9 @@ go get github.com/testcontainers/testcontainers-go ```go import ( + "context" + "testing" + "github.com/testcontainers/testcontainers-go" "github.com/testcontainers/testcontainers-go/wait" ) @@ -36,8 +39,8 @@ func TestWithRedis(t *testing.T) { t.Error(err) } defer func() { - if err := redisC.terminate(ctx); err != nil { - t.Fatalf("failed to terminate container: %w", err) + if err := redisC.Terminate(ctx); err != nil { + t.Fatalf("failed to terminate container: %s", err.Error()) } }() }