gin-contrib / timeout

Timeout middleware for Gin
MIT License
185 stars 38 forks source link

README.md - Add WithResponse option wrong example #10

Closed vadimski closed 3 years ago

vadimski commented 3 years ago

There is an issue on describing how to use "Add WithResponse option." in README.md file r.GET("/", timeout.New( WithTimeout(100*time.Microsecond), WithHandler(emptySuccessResponse), WithResponse(testResponse), )) should be:

r.GET("/", timeout.New( timeout.WithTimeout(100*time.Microsecond), timeout.WithHandler(emptySuccessResponse), timeout.WithResponse(testResponse), ))