Skip to content

Commit

Permalink
typos
Browse files Browse the repository at this point in the history
  • Loading branch information
m110 committed Aug 24, 2024
1 parent b9286a2 commit 900da37
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions _examples/real-world-examples/receiving-webhooks/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ import (
"encoding/json"
"errors"
"flag"
"io/ioutil"
"fmt"
"io"
stdHttp "net/http"
_ "net/http/pprof"

Expand Down Expand Up @@ -45,7 +46,7 @@ func main() {
*httpAddr,
http.SubscriberConfig{
UnmarshalMessageFunc: func(topic string, request *stdHttp.Request) (*message.Message, error) {
b, err := ioutil.ReadAll(request.Body)
b, err := io.ReadAll(request.Body)
if err != nil {
return nil, fmt.Errorf("cannot read body: %w", err)
}
Expand Down Expand Up @@ -97,7 +98,7 @@ func main() {
)

go func() {
// HTTP server needs to be started after router is ready.
// HTTP server needs to be started after the router is ready.
<-r.Running()
_ = httpSubscriber.StartHTTPServer()
}()
Expand Down

0 comments on commit 900da37

Please # to comment.