Skip to content

Commit

Permalink
fix example
Browse files Browse the repository at this point in the history
  • Loading branch information
eyasliu committed Jan 20, 2021
1 parent 98a09b0 commit 3978fb6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ func main() {
ws := xwebsocket.New()
http.Handle("/ws", ws)

srv := ws.New(ws)
srv := ws.Srv(ws)
srv.Use(cmdsrv.AccessLogger("MYSRV")). // 打印请求响应日志
Use(cmdsrv.Recover()) // 统一错误处理,消化 panic 错误

Expand Down

0 comments on commit 3978fb6

Please sign in to comment.