Skip to content

Commit

Permalink
readme: fix Group example
Browse files Browse the repository at this point in the history
  • Loading branch information
demget authored Feb 8, 2022
1 parent 8ad1e04 commit 3ae6ec8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,8 @@ b.Use(middleware.Logger())
b.Use(middleware.AutoRespond())

// Group-scoped middleware:
adminOnly := b.Group(middleware.Whitelist(adminIDs...))
adminOnly := b.Group()
adminOnly.Use(middleware.Whitelist(adminIDs...))
adminOnly.Handle("/ban", onBan)
adminOnly.Handle("/kick", onKick)

Expand Down

0 comments on commit 3ae6ec8

Please sign in to comment.