add internal package which includes json package (#1504)
chore: update vendor version (#1520)
chore: update issue_implate (#1524)
docs: add fnproject to gin's user list (#1505)
example for RunLimited
example for RunLimited
add new capability to limit accepted connections
Add golang 1.11.x testing (#1514)
* Add golang 1.11.x testing
* remove the latest golang testing
See the issue: https://github.com/gin-gonic/gin/pull/1510
Update README.md (#1509)
change `ShouldBindXML` to `ShouldBindJSON`
add internal package which includes json package (#1504)
chore: update vendor version (#1520)
chore: update issue_implate (#1524)
docs: add fnproject to gin's user list (#1505)
added new capability to limit the accepted requests
example for RunLimited
example for RunLimited
* Add new function to Render interface for writing content type only
* Add support for the new function in Render interface for writing content-type only
* Fix unhandled merge conflict in context_test.go
* Update vendor.json
Gin normally silently swallows errors writing to the client; however in WriteJSON (and thus context.JSON), the ResponseWriter was being passed directly into the JSON encoder, which will return an error if there's an error writing to the stream. For instance, context.JSON would panic with errors like "write tcp XXX-> YYY: write: connection reset by peer" if the client disconnected before the response was complete. This change makes JSON.Render() treat write errors the same as IndentedJSON, Data, and other renderers.
benchmark old ns/op new ns/op delta
BenchmarkOneRouteJSON 1143 1053 -7.87%
benchmark old allocs new allocs delta
BenchmarkOneRouteJSON 4 3 -25.00%
benchmark old bytes new bytes delta
BenchmarkOneRouteJSON 72 56 -22.22%