1120 Commits

Author SHA1 Message Date
田欧
7c7f703cc5
initial go.mod module definition () 2018-09-16 23:22:54 +08:00
田欧
6db092f778 chore: add some annotations ()
ref  should all annotations and can close  .
2018-09-15 15:21:54 +08:00
田欧
d510595aa5 chore: add some annotations ()
ref:  
because I am not a native English, maybe have a bit problem.
2018-09-15 10:23:32 +08:00
Iskander (Alex) Sharipov
3f27866f80 simplify slice expressions: s[:] => s ()
Found using https://go-critic.github.io/overview#unslice-ref
2018-09-12 21:21:26 +08:00
Iskander (Alex) Sharipov
df1e17c2f0 remove debug print statements from test code ()
Found using https://go-critic.github.io/overview#commentedOutCode-ref
2018-09-12 09:13:16 +08:00
Javier Provecho Fernandez
500ebd9ea8
docs: add fnproject to gin's user list () 2018-08-31 22:38:16 +02:00
田欧
705e199298 chore: update issue_implate () 2018-09-01 00:40:33 +08:00
田欧
7451a402bb chore: update vendor version ()
 adds some lib when upgrade json-iterator but it is not needed, and use `v1.1.5` not `1.1.5` version for json-iterator.
2018-08-30 23:36:53 +08:00
田欧
72db8acd99
add internal package which includes json package () 2018-08-30 19:04:03 +08:00
llgoer
708b76adf0 Update README.md ()
change  `ShouldBindXML` to `ShouldBindJSON`
2018-08-30 14:29:26 +08:00
Bo-Yi Wu
09d342abbc Add golang 1.11.x testing ()
* Add golang 1.11.x testing

* remove the latest golang testing

See the issue: https://github.com/gin-gonic/gin/pull/1510
2018-08-30 14:22:51 +08:00
anoty
0da5b0c85a format readme code import () 2018-08-21 13:29:25 +08:00
田欧
85f3e78abc chore: remove else instead of return/continue ()
As[ Effective Go](https://golang.org/doc/effective_go.html?#if) about `if` said, remove else statement instead of return/continue statement.
2018-08-20 21:49:24 +08:00
junfengye
0ebd42d0a9 Update jsoniter.go ()
add newencoder to fix compile error for -tags=jsoniter
2018-08-20 18:25:45 +08:00
Filip Figiel
c6110f970c Add PureJSON renderer ()
Closes 
2018-08-20 15:15:31 +08:00
田欧
b7bb9baa64
chore: add missing copyright and update if/else () 2018-08-19 22:52:43 +08:00
田欧
32b58e0fd2 render: update msgpack usage ()
please see msgpack usage: https://github.com/ugorji/go/tree/master/codec#usage
2018-08-19 22:14:02 +08:00
田欧
6073a79ee0
not use protobuf on context but use it on render () 2018-08-19 17:39:58 +08:00
aljun
efdd3c8b81 Add support for Protobuf format response and unit test ()
`Gin` now have the `protobufBinding` function to check the request format, but didn't have a protobuf response function like `c.YAML()`.
In our company [ByteDance](http://bytedance.com/), the largest internet company using golang in China, we use `gin` to transfer __Protobuf__  instead of __Json__, we have to write some internal library to make some wrappers to achieve that, and the code is not elegant. So we really want such a feature.
2018-08-19 10:45:56 +08:00
chainhelen
f856aa85cd Update readme about the version of gin () 2018-08-17 14:59:55 +08:00
David Zhang
f5451bd645 Fix typo in README [ci skip] () 2018-08-17 11:33:23 +08:00
Eason Lin
a643d20605 readme: fix users link () 2018-08-17 11:21:14 +08:00
Alexander Lokhman
7eb0f74b89 Set default time format in form binding () 2018-08-17 09:41:56 +08:00
syssam
40ab9de4b5 Add BindXML AND ShouldBindXML ()
Add BindXML AND ShouldBindXML 
2018-08-17 09:12:15 +08:00
田欧
bef6c56c89 chore: upgrade dependency library version ()
upgrade lib version, and upgrade `github.com/json-iterator/go` to add two libs.
2018-08-16 17:38:17 +08:00
Abner Chen
64a4548642 Fix typo in readme () 2018-08-15 13:42:12 +08:00
Javier Provecho Fernandez
b869fe1415
docs: add changelog for v1.3.0, update authors and version const ()
* docs: add changelog for v1.3.0, update authors and version const

*  add link for every referenced pull request ()

* docs: add changelog for v1.3.0, update authors and version const

* add link for pr
2018-08-14 10:58:52 +02:00
田欧
6c8a973134
add issue and pull request template explain ()
* add issue/pr template explain

* add issue/pr template explain
2018-08-14 11:35:13 +08:00
田欧
f45c928a15 chore: use http.Status* instead of hard code () 2018-08-14 09:51:56 +08:00
Alex
8aef947f6e docs: remove double negative in README.md ()
"not match neither" means that it will match.
2018-08-12 22:54:22 +02:00
田欧
6159213462 unify test data ()
mkdir a test data dir.
2018-08-12 23:38:31 +08:00
田欧
1ae32f3a2c improve render code coverage ()
all code coverage > 99%
2018-08-12 22:02:37 +08:00
田欧
202db4fb11 improve utils code coverage () 2018-08-12 21:38:07 +08:00
田欧
e5bb4f62a2 chore: add return or remove else for reduce indent () 2018-08-12 21:17:57 +08:00
田欧
7e64d32269 Attempt to fix ()
2018-08-12 10:12:33 +08:00
田欧
8fc8ce0472 small enhance for cleanPath ()
from httprouter patch: https://github.com/julienschmidt/httprouter/pull/243
2018-08-10 20:50:23 +08:00
田欧
1f1bc429ed chore: add test case for source/function of recovery.go () 2018-08-09 17:20:06 +08:00
田欧
9666ba6738 chore: update top bar header () 2018-08-07 13:49:31 +08:00
zhanweidu
0552c3bc3a flush operation will overwrite the origin status code ()
The status of responseWriter will be overwrite if flush was called. This is caused by the Flush of http.response.Flush().
2018-08-07 12:41:28 +08:00
Dmitry Dorogin
9b7e7bdce6 Add tests for context.Stream () 2018-08-07 06:44:32 +08:00
grapeVine
e2b4cf6e2d interface implement type check ()
interface implement type check
2018-08-06 23:08:01 +08:00
田欧
647535cd9b Support map as query string or post form parameters ()
* support query map

* add GetQueryMap and unittest

* support post-form map

* add readme for query map

* attempt to fix bug for post-form map when go version is 1.6

* remove duplicate code

* remove comment
2018-08-06 12:07:11 +08:00
Dmitry Dorogin
631cfbd1ef Simplify context error ()
Hello!

Looking through context package and found a little bit complicated switch block. And tried to make it easier.

Thanks!
2018-08-05 13:29:26 +08:00
solos
220e8d3453 return json if jsonp has not callback ()
return json if jsonp has not callback
2018-07-21 00:52:55 +08:00
Rex Lee(李俊)
85221af84c add json ASCII string render ()
add a json render that rendering json as ASCII string
2018-07-03 17:17:08 +08:00
vz
d17a12591f update assert param(expect, actual) position ()
- update assert param(expect, actual) position
2018-07-03 15:39:18 +08:00
田欧
1c4cbfae59 chore: remove duplicate code () 2018-07-02 11:06:56 +08:00
田欧
cdd02fa9d6 update error(err) to err ()
the pull request update `return error(err)` to `return err`, and remove `kindOfData`.
2018-07-01 21:10:48 +08:00
田欧
eb9f313144 add comment for context ()
ref  
annotation from go context source.
2018-06-28 17:08:09 +08:00
田欧
c00f21ff23 add go version prerequisite and debug warning ()
* add go version prerequisite and debug warning

* merge duplicate content

* remove duplicate content
2018-06-26 18:56:43 +08:00