Javier Provecho Fernandez
b869fe1415
docs: add changelog for v1.3.0, update authors and version const ( #1478 )
...
* docs: add changelog for v1.3.0, update authors and version const
* add link for every referenced pull request (#1481 )
* docs: add changelog for v1.3.0, update authors and version const
* add link for pr
v1.3.0
2018-08-14 10:58:52 +02:00
田欧
6c8a973134
add issue and pull request template explain ( #1483 )
...
* 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 ( #1482 )
2018-08-14 09:51:56 +08:00
Alex
8aef947f6e
docs: remove double negative in README.md ( #1480 )
...
"not match neither" means that it will match.
2018-08-12 22:54:22 +02:00
田欧
6159213462
unify test data ( #1417 )
...
mkdir a test data dir.
2018-08-12 23:38:31 +08:00
田欧
1ae32f3a2c
improve render code coverage ( #1474 )
...
all code coverage > 99%
2018-08-12 22:02:37 +08:00
田欧
202db4fb11
improve utils code coverage ( #1473 )
2018-08-12 21:38:07 +08:00
田欧
e5bb4f62a2
chore: add return or remove else for reduce indent ( #1470 )
2018-08-12 21:17:57 +08:00
田欧
7e64d32269
Attempt to fix #1462 ( #1463 )
...
#1462
2018-08-12 10:12:33 +08:00
田欧
8fc8ce0472
small enhance for cleanPath ( #1469 )
...
from httprouter patch: https://github.com/julienschmidt/httprouter/pull/243
2018-08-10 20:50:23 +08:00
youngblood
f41f3da10f
delete redundancy code
2018-08-10 12:09:48 +08:00
田欧
1f1bc429ed
chore: add test case for source/function of recovery.go ( #1467 )
2018-08-09 17:20:06 +08:00
youngbloood
9e46bad91c
Merge pull request #1 from isgj/master
...
Save fullPath when node was already added and after moved to a child
2018-08-09 17:08:58 +08:00
isgj
6669d5e8e7
Save fullPath when node was already added and after moved to a child
2018-08-09 10:31:14 +02:00
youngblood
124cea4e8c
Merge branch 'master' of github.com:youngbloood/gin
2018-08-08 22:42:03 +08:00
youngblood
5bb5598249
add fullpath in the end node
2018-08-08 22:40:01 +08:00
youngblood
a9c143b963
add fullpath in node
2018-08-08 22:40:01 +08:00
youngblood
df95e14718
add fullpath in node
2018-08-08 22:40:01 +08:00
youngblood
4695ec357f
tree_test
2018-08-08 22:40:01 +08:00
youngblood
91af378995
add RelativePath
2018-08-08 22:40:01 +08:00
youngblood
cbd27b8f80
add RelativePath
2018-08-08 22:40:01 +08:00
youngblood
45bb968ea8
add fullpath in the end node
2018-08-08 18:44:35 +08:00
youngblood
2fc9b15c7a
add fullpath in node
2018-08-08 18:40:15 +08:00
youngblood
b5847d0a7a
add fullpath in node
2018-08-08 17:21:42 +08:00
youngbloood
427ca1c5cd
Merge branch 'master' into master
2018-08-08 10:51:52 +08:00
田欧
9666ba6738
chore: update top bar header ( #1461 )
2018-08-07 13:49:31 +08:00
zhanweidu
0552c3bc3a
flush operation will overwrite the origin status code ( #1460 )
...
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 ( #1433 )
2018-08-07 06:44:32 +08:00
grapeVine
e2b4cf6e2d
interface implement type check ( #1459 )
...
interface implement type check
2018-08-06 23:08:01 +08:00
田欧
647535cd9b
Support map as query string or post form parameters ( #1383 )
...
* 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 ( #1431 )
...
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
youngblood
adbfb90327
tree_test
2018-07-28 14:41:16 +08:00
youngblood
7b86a6382d
add RelativePath
2018-07-28 13:14:47 +08:00
youngblood
ff434e2667
add RelativePath
2018-07-28 13:13:02 +08:00
solos
220e8d3453
return json if jsonp has not callback ( #1438 )
...
return json if jsonp has not callback
2018-07-21 00:52:55 +08:00
Rex Lee(李俊)
85221af84c
add json ASCII string render ( #1358 )
...
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 ( #1421 )
...
- update assert param(expect, actual) position
2018-07-03 15:39:18 +08:00
田欧
1c4cbfae59
chore: remove duplicate code ( #1418 )
2018-07-02 11:06:56 +08:00
田欧
cdd02fa9d6
update error(err) to err ( #1416 )
...
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 ( #1413 )
...
ref #1075
annotation from go context source.
2018-06-28 17:08:09 +08:00
田欧
c00f21ff23
add go version prerequisite and debug warning ( #1394 )
...
* add go version prerequisite and debug warning
* merge duplicate content
* remove duplicate content
2018-06-26 18:56:43 +08:00
田欧
6c6d97ba2e
remove hardcode instead of http status value ( #1411 )
2018-06-26 17:21:32 +08:00
田欧
1f59bad84b
add an edge case from httprouter ( #1407 )
2018-06-23 11:06:27 +08:00
田欧
760d0574db
vendor: remove vendor package from example folder ( #1402 )
...
updated `vendor.json` is ok.
but set `ignore test` in `vendor.json`, `x/net/context` package only use in `context_test.go`, I don't know why vendor still need it.
please @appleboy review the pull request, thanks a lot.
2018-06-23 00:45:43 +08:00
田欧
8035359102
use strings.Split instead of strings.IndexByte ( #1406 )
2018-06-23 00:08:58 +08:00
田欧
605aa1c30f
example: fix typo for grpc ( #1405 )
...
sorry...fixed #1403
2018-06-22 23:44:45 +08:00
田欧
737d2fb7ab
add grpc example ( #1401 )
...
use grpc helloworld example.
2018-06-22 09:51:06 +08:00
htobenothing
bf85b32c1d
Add Pusher() function for support http2 server push ( #1273 )
...
gin already support http2, while previously not support server push.
Add Pusher() function to extend the ResponseWriter interface.
```golang
// get http.Pusher
if pusher := c.Writer.Pusher(); pusher != nil {
// use pusher.Push() to do server push
}
```
<img width="881" alt="screen shot 2018-03-07 at 11 20 49 pm" src="https://user-images.githubusercontent.com/16014993/37100619-680c00c6-225e-11e8-9352-76ec3bd62894.png ">
2018-06-21 09:53:52 +08:00
田欧
87d536c001
utils: use strings.Split instead of strings.IndexByte ( #1400 )
...
And I test them benchmark:
code:
```go
# stringsbench.go
package stringsbench
import "strings"
func index(part string) string {
if index := strings.IndexByte(part, ';'); index >= 0 {
if part := strings.TrimSpace(strings.Split(part, ";")[0]); part != "" {
return part[0:index]
}
}
return ""
}
func split(part string) string {
return strings.Split(part, ";")[0]
}
```
```go
# stringsbench_test.go
package stringsbench
import (
"testing"
)
func BenchmarkIndex(b *testing.B) {
b.RunParallel(func(pb *testing.PB) {
for pb.Next() {
index("text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8")
}
})
}
func BenchmarkSplit(b *testing.B) {
b.RunParallel(func(pb *testing.PB) {
for pb.Next() {
split("text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8")
}
})
}
```
And the result:
```shell
➜ strings go test --bench=.
goos: darwin
goarch: amd64
BenchmarkIndex-8 30000000 46.1 ns/op
BenchmarkSplit-8 50000000 35.9 ns/op
PASS
ok _/Users/tianou/strings 3.271s
➜ strings go test --bench=.
goos: darwin
goarch: amd64
BenchmarkIndex-8 30000000 44.2 ns/op
BenchmarkSplit-8 50000000 34.7 ns/op
PASS
ok _/Users/tianou/strings 3.156s
➜ strings go test --bench=.
goos: darwin
goarch: amd64
BenchmarkIndex-8 30000000 45.6 ns/op
BenchmarkSplit-8 50000000 35.3 ns/op
PASS
ok _/Users/tianou/strings 3.230s
```
2018-06-21 09:31:43 +08:00
田欧
caf3e350a5
doc: update readme for adding binding about skip validate ( #1359 )
...
* update readme for adding binding about skip validate
* update readme for adding binding about skip validate
2018-05-31 14:13:40 +08:00