Commit Graph

1392 Commits

Author SHA1 Message Date
Bo-Yi Wu 41316b9ca9 feat: add GetRawData func. (#857)
* feat: add GetRawData func.

* update return style

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2017-03-31 08:45:56 +08:00
Javier Provecho 73e5fcd855 feat(context): add idiomatic binding functions for clear err managment 2017-03-29 14:32:12 +00:00
Bo-Yi Wu ad2dacedd6 feat: Support get value from request header. (#839) 2017-03-24 20:43:23 +08:00
Bo-Yi Wu 6bdc9afc8f fix readme format (#837)
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2017-03-16 10:54:00 -05:00
Bo-Yi Wu b8be9df642 docs: add graceful-shutdown example for go 1.8 (#835)
* docs: add graceful-shutdown example for go 1.8

* fix testing

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2017-03-16 10:38:30 -05:00
Bo-Yi Wu 28b18cd1fb feat: support cygwin for log writer. (#834) 2017-03-15 20:15:41 -05:00
Bo-Yi Wu b1a15020d0 fix: gofmt error. (#833) 2017-03-11 07:35:29 -06:00
Javier Provecho Fernandez 7e136484b8 Merge pull request #825 from rohanpai/develop
docs(readme): add sourcegraph badge
2017-03-02 00:03:16 +01:00
Rohan Pai b2d7e35a60 Added Sourcegraph badge 2017-03-01 12:51:13 -08:00
Sergey Gonimar 38cc731224 fix typo (#822) 2017-03-01 16:42:59 +08:00
Sergey Egorov b1872ec369 The url.RawPath used when engine.UseRawPath is set to true. (#810) 2017-02-28 18:29:41 +08:00
cssivision f4dec22c50 fix: buffer should reset when test logger output (#819) 2017-02-28 15:15:52 +08:00
Manu MA a47a8ca6e7 docs(README): fixes the markdown code format 2017-02-26 20:03:05 +01:00
Harindu Perera 5be2123c1a Added support for MessagePack binding and rendering (#808)
Added deps to vendor.json and fixed rendering bug
2017-02-23 22:08:37 +08:00
Andrey Nering 863248034b Support time.Time on form binding (#801) 2017-02-17 21:32:36 +08:00
Bo-Yi Wu d94ee48fb7 Add go 1.8.x testing on travis (#806) 2017-02-17 16:38:56 +08:00
Bo-Yi Wu 7fcc6088c1 Support testing on latest version of golang. 2017-02-16 09:27:10 +08:00
pjgg 6ce1e86a27 chore(errorHandler):new abortWithStatus method with Json body (#800) 2017-02-14 09:11:01 +08:00
Franz Bettag 2ae8a25fc9 Added HandleContext to re-enter soft-rewritten Requests. (#709) 2017-02-10 22:44:55 +08:00
Vasilyuk Vasiliy 049da60f51 Update gin version (#790)
* Revert "Merge pull request #753 from gin-gonic/bug"

This reverts commit 556287ff08, reversing
changes made to 32cab500ec.

* Revert "Merge pull request #744 from aviddiviner/logger-fix"

This reverts commit c3bfd69303, reversing
changes made to 9177f01c28.

* Update gin version
2017-02-01 22:49:24 +08:00
mbesancon 2d8477fc42 Fixed typos in Context (#797)
Simple english typos in the Copy() method
2017-02-01 22:47:50 +08:00
Javier Provecho Fernandez 963acc4b0c Fix #198 (#781)
* 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
2017-01-09 16:24:48 +01:00
novaeye 75c2274b4b better display for log message (#623) 2017-01-05 16:29:33 +08:00
Bo-Yi Wu 8191cdf5d6 docs: update readme for multiple template package. (#786) 2017-01-05 12:22:32 +08:00
Javier Provecho Fernandez cc2b75f830 Merge pull request #784 from gin-gonic/readme
Add upload file example.
2017-01-03 17:04:59 +01:00
Javier Provecho Fernandez 050937dab8 Improve "Upload file" example, Fix MD typos 2017-01-03 17:04:29 +01:00
Javier Provecho Fernandez fd869845a3 Merge pull request #783 from gin-gonic/ip
Update getClientIP()
2017-01-03 16:56:16 +01:00
tsirolnik c115074d77 Use X-Forwarded-For before X-Real-Ip
Nginx uses X-Real-Ip with its IP instead of the client's IP. Therefore, we should use X-Forwarded-For *before* X-Real-Ip
2017-01-03 23:43:05 +08:00
Bo-Yi Wu 970e96e388 test: update client ip testing. 2017-01-03 23:42:21 +08:00
Bo-Yi Wu 17af53a565 add upload file example.
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2017-01-03 11:50:35 +08:00
Bo-Yi Wu 6596aa3b71 [ci skip] update readme for upload file.
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2017-01-03 10:34:27 +08:00
Javier Provecho Fernandez 565e1e0c87 Merge pull request #780 from gin-gonic/patch-4
Add comment for the logic behind func.
2017-01-02 13:54:06 +01:00
Bo-Yi Wu aa1a2b75fa Add comment for the logic behind func.
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2017-01-02 18:01:25 +08:00
David Irvine ebe3580daf Add convenience method to check if websockets required (#779)
* Add convenience method to check if websockets required

* Add tests

* Fix up tests for develop branch
2017-01-02 16:05:30 +08:00
Bo-Yi Wu ff17a8dd75 Merge pull request #772 from gin-gonic/patch-3
Improve document for #742
2017-01-02 10:50:13 +08:00
Javier Provecho Fernandez 713c3697f4 Add instructions for pulling latest changes 2017-01-01 11:54:37 +01:00
Bo-Yi Wu df2e95cc78 Merge pull request #775 from gin-gonic/upload
Support upload single or multiple files.
2016-12-27 19:26:54 +08:00
Bo-Yi Wu 5cc3d5955f Support upload single or multiple files.
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2016-12-24 12:25:01 +08:00
Bo-Yi Wu 93e36404a1 Improve document for #742
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2016-12-23 09:12:13 +08:00
Bo-Yi Wu 4f439b39f5 Merge pull request #770 from gin-gonic/console
Support disable console color
2016-12-21 14:48:23 +08:00
Bo-Yi Wu d158ef2e82 Support disable console color.
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2016-12-21 14:41:47 +08:00
Bo-Yi Wu e06cef0672 Merge pull request #756 from gin-gonic/756-update-vendor-system
Fix #731
2016-12-17 00:02:31 +08:00
Bo-Yi Wu 787bff85e5 fix testing.
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2016-12-11 10:14:23 +08:00
chriswhelix 97d310b55c Honor normal gin write contract for context.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.
2016-12-11 10:14:23 +08:00
Javier Provecho Fernandez abcbfb5d68 Update .travis.yml 2016-12-07 00:26:09 +01:00
Javier Provecho Fernandez 44529e4a34 Update vendor.json 2016-12-07 00:25:57 +01:00
Javier Provecho Fernandez 2cab17ba50 Merge pull request #701 from maxatome/patch-1
Context.Get() does not need to test whether Keys is nil or not
2016-12-06 20:39:01 +01:00
Javier Provecho Fernandez 2033b73551 Migrate from godeps to govendor 2016-12-06 19:53:58 +01:00
Bo-Yi Wu 764e138e32 Merge pull request #755 from gin-gonic/755-app-engine-client-ip
Fix #723
2016-12-06 08:14:11 -06:00
Javier Provecho Fernandez 98af44604c Update const framework version to 1.1.4 2016-12-06 14:38:14 +01:00