Blob Blame History Raw
From 92d3f6bd6dc3cec18b84e324f2d8cdaeebee1976 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Robert-Andr=C3=A9=20Mauchin?= <zebob.m@gmail.com>
Date: Sat, 8 Aug 2020 00:57:15 +0200
Subject: [PATCH] Add context to context.WithValue
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Fix #7.

Signed-off-by: Robert-André Mauchin <zebob.m@gmail.com>
---
 log/logger_test.go | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/log/logger_test.go b/log/logger_test.go
index 2a7beeb..c002ca7 100644
--- a/log/logger_test.go
+++ b/log/logger_test.go
@@ -41,7 +41,7 @@ func TestNewLogger(t *testing.T) {
 	// Test logging for context.
 	type contextKey string
 	const traceID contextKey = "trace_id"
-	ctx := context.WithValue(nil, traceID, "60b725f10c9c85c70d97880dfe8191b3")
+	ctx := context.WithValue(context.Background(), traceID, "60b725f10c9c85c70d97880dfe8191b3")
 
 	l.SetInterestContextKeys([]interface{}{traceID})
 
-- 
2.26.2