Skip to content

Commit

Permalink
Run example with context (#114)
Browse files Browse the repository at this point in the history
  • Loading branch information
gabeduke authored and m110 committed Aug 24, 2019
1 parent c77498c commit b8fcecb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion _examples/http-to-kafka/main.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package main

import (
"context"
"encoding/json"
"flag"
"io/ioutil"
Expand Down Expand Up @@ -95,5 +96,5 @@ func main() {
_ = httpSubscriber.StartHTTPServer()
}()

_ = r.Run()
_ = r.Run(context.Background())
}
3 changes: 2 additions & 1 deletion _examples/your-first-app/main.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package main

import (
"context"
"encoding/json"
"log"
"time"
Expand Down Expand Up @@ -135,7 +136,7 @@ func main() {
},
)

if err := router.Run(); err != nil {
if err := router.Run(context.Background()); err != nil {
panic(err)
}
}

0 comments on commit b8fcecb

Please # to comment.