From f4fd51a2a0cc605401d6d80f82aac1f85ff96819 Mon Sep 17 00:00:00 2001 From: Gabriel Duke Date: Fri, 23 Aug 2019 22:44:43 -0400 Subject: [PATCH 1/2] Run example with context --- _examples/your-first-app/main.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/_examples/your-first-app/main.go b/_examples/your-first-app/main.go index 51a5de6ff..093e21152 100644 --- a/_examples/your-first-app/main.go +++ b/_examples/your-first-app/main.go @@ -1,6 +1,7 @@ package main import ( + "context" "encoding/json" "log" "time" @@ -135,7 +136,7 @@ func main() { }, ) - if err := router.Run(); err != nil { + if err := router.Run(context.Background()); err != nil { panic(err) } } From 822c5a78eac74ff41cf5bb53f9c48d6cbcf347e5 Mon Sep 17 00:00:00 2001 From: Gabriel Duke Date: Fri, 23 Aug 2019 23:15:14 -0400 Subject: [PATCH 2/2] add context --- _examples/http-to-kafka/main.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/_examples/http-to-kafka/main.go b/_examples/http-to-kafka/main.go index f02245348..03705a521 100644 --- a/_examples/http-to-kafka/main.go +++ b/_examples/http-to-kafka/main.go @@ -1,6 +1,7 @@ package main import ( + "context" "encoding/json" "flag" "io/ioutil" @@ -95,5 +96,5 @@ func main() { _ = httpSubscriber.StartHTTPServer() }() - _ = r.Run() + _ = r.Run(context.Background()) }