Skip to content

Commit

Permalink
Update module example.
Browse files Browse the repository at this point in the history
  • Loading branch information
googollee committed Sep 21, 2023
1 parent 4e9ff38 commit 91856e5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion examples/module_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,9 @@ func Handler(ctx espresso.Context) error {

func LaunchModule() (addr string, cancel func()) {
server, _ := espresso.New()
server.AddModule(ModuleCache, ModuleMQ, ModuleDB)
if err := server.AddModule(ModuleCache, ModuleMQ, ModuleDB); err != nil {
panic(err)
}

server.HandleFunc(Handler)

Expand Down

0 comments on commit 91856e5

Please sign in to comment.