Commit Graph

1785 Commits

Author SHA1 Message Date
zzjin
c0418c48e4
Add support go-json, another drop-in json replacement. (#2680)
Co-authored-by: Bo-Yi Wu <appleboy.tw@gmail.com>
Co-authored-by: thinkerou <thinkerou@gmail.com>
2021-04-21 08:45:49 +08:00
heige
f1da692fbd
RouterGroup.Handle regular match optimization of http method (#2685)
Co-authored-by: thinkerou <thinkerou@gmail.com>
Co-authored-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2021-04-21 08:24:55 +08:00
y-yagi
7313b8fddc
Use Header() instead of deprecated HeaderMap (#2694)
Co-authored-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2021-04-21 07:55:08 +08:00
thinkerou
77649bcfee
support Go v1.16 version (#2638) 2021-04-21 07:38:54 +08:00
thinkerou
ee4de846a8
Remove go1.12 support (#2679)
* Revert "Adding ppc64le architecture support on travis-ci (#2538)"

This reverts commit fca3f95d7c.

* not support go1.12

* fix

* Update errors_test.go

* Update debug.go
2021-04-12 00:29:34 +08:00
thinkerou
51c7d001e0
bump to v1.7.1 (#2678) 2021-04-09 07:38:13 +08:00
Xudong Cai
03e5e05ae0
fix: data race with trustedCIDRs (#2674) (#2675)
Co-authored-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2021-04-09 00:27:34 +08:00
Bo-Yi Wu
d496f64540
bump to v1.7.0 version (#2672) 2021-04-08 15:47:41 +08:00
Manu MA
bfc8ca285e
feat(engine): add trustedproxies and remoteIP (#2632)
Co-authored-by: Søren L. Hansen <soren@linux2go.dk>
Co-authored-by: Bo-Yi Wu <appleboy.tw@gmail.com>
Co-authored-by: thinkerou <thinkerou@gmail.com>
Co-authored-by: Javier Provecho Fernandez <javiertitan@gmail.com>
2021-04-06 11:37:25 +08:00
Ross Wolf
f3de8132c5
Add mixed param and non-param paths (port of httprouter#329) (#2663)
Co-authored-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2021-04-06 10:49:08 +08:00
Ni Hao
a331dc6a31
chore: remove duplicate test 'assert.Equal' (#2617)
Co-authored-by: thinkerou <thinkerou@gmail.com>
2021-03-27 14:41:31 +08:00
thinkerou
ed6f85c478
build: convert to go:build directives (#2664) 2021-03-27 09:09:44 +08:00
Andy Pan
1bdf86b722
Remove the tedious named return value (#2620)
Co-authored-by: thinkerou <thinkerou@gmail.com>
2021-02-08 23:24:22 +08:00
Alexander Melentyev
e899771392
chore: Deleted spaces (#2622) 2021-01-27 09:58:21 +08:00
Snawoot
b01605bb5b
basic auth: fix timing oracle (#2609)
Co-authored-by: thinkerou <thinkerou@gmail.com>
2021-01-13 09:40:37 +08:00
Josep Jesus Bigorra Algaba
46ddd4259c
Fixes to the graceful shutdown example (#2552)
* Change error comparison to use errors.Is() and add a line of whitespace before the if statement on graceful shutdown

* Change from log.Fatalf to log.Printf to ensure the graceful shutdown actually works

Co-authored-by: J. J. Bigorra <josep@prowarehouse.nl>
Co-authored-by: thinkerou <thinkerou@gmail.com>
2021-01-13 09:06:12 +08:00
Qt
f4bc259de3
fix error gin support min Go version (#2584)
Co-authored-by: thinkerou <thinkerou@gmail.com>
2021-01-12 08:32:04 +08:00
Rubi
e753c502dc
gin mode unknown: show available mode (#2567)
Co-authored-by: thinkerou <thinkerou@gmail.com>
2021-01-12 00:03:31 +08:00
Jeff
4d2dad5961
test: fixed the TestUnixSocket test on windows (#2595)
Co-authored-by: thinkerou <thinkerou@gmail.com>
2021-01-11 09:07:45 +08:00
thinkerou
a28cc088b5
Revert "Adding ppc64le architecture support on travis-ci (#2538)" (#2602) 2021-01-10 23:51:02 +08:00
kishor kunal raj
fca3f95d7c
Adding ppc64le architecture support on travis-ci (#2538)
Co-authored-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2021-01-03 22:30:22 +08:00
wuhuizuo
4bfae4c8c8
Support binding for slice/array obj [Rewrite] (#2302)
Co-authored-by: thinkerou <thinkerou@gmail.com>
Co-authored-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2021-01-03 21:43:34 +08:00
thinkerou
a573ec6a37
chore: update tree (#2371)
Co-authored-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2021-01-03 21:34:11 +08:00
thinkerou
3b5e861bb1
fix compile error from #2572 (#2600) 2021-01-03 21:14:56 +08:00
An Xiao (Luffy)
7742ff50e0
Fix typos in context.go (#2551) 2020-11-11 09:41:35 +08:00
Alessandro (Ale) Segala
65ed60ed13
Allow bind with a map[string]string (#2484)
Co-authored-by: thinkerou <thinkerou@gmail.com>
2020-10-31 07:20:47 +08:00
thinkerou
16cd8cdd4e
ci: romove go1.11 for gin1.7 (#2540) 2020-10-25 17:08:30 +08:00
Peperoncino
7e444c6f59
upgrade go-validator to v10.4.1 (#2536) 2020-10-21 09:36:01 +08:00
Georges Varouchas
f969bfaf50
implement ".Unwrap() error" on Error type (#2525) (#2526)
Co-authored-by: Bo-Yi Wu <appleboy.tw@gmail.com>
Co-authored-by: thinkerou <thinkerou@gmail.com>
2020-10-17 21:22:37 +08:00
xyb
c83a1cca0a
reduce allocs and improve the render WriteString (#2508)
Co-authored-by: yonbiaoxiao <yonbiaoxiao@tencent.com>
Co-authored-by: Bo-Yi Wu <appleboy.tw@gmail.com>
Co-authored-by: thinkerou <thinkerou@gmail.com>
2020-10-16 18:32:33 +08:00
Zasda Yusuf Mikail
d541085b59
Add some missing dots on README (#2519)
Signed-off-by: Zasda Yusuf Mikail <zasdaym@gmail.com>

Co-authored-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2020-10-16 09:32:10 +08:00
Zach Newburgh
a7a6986d73
fix: print headers without Authorization header on broken pipe (#2528)
Co-authored-by: thinkerou <thinkerou@gmail.com>
2020-10-15 22:41:35 +08:00
xyb
1297966100
use IndexByte replace Split to improve performance (#2500)
Co-authored-by: yonbiaoxiao <yonbiaoxiao@tencent.com>
Co-authored-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2020-10-15 13:55:57 +08:00
eudore
540b1eff70
update content-disposition header to MIME-style (#2512) 2020-09-25 09:45:17 +08:00
John Bampton
3100b7cb05
Fix spelling (#2498) 2020-09-14 10:40:20 +08:00
yugu
1f232c7f47
docs:close the body of the response (#2494) 2020-09-09 20:00:44 +08:00
Dennis Cho
b860d8672d
Fix typo (#2489) 2020-09-02 23:15:25 +08:00
kaiiak
0304ee96ed
Add GetUint and GetUint64 method on gin.context (#2487) 2020-09-01 09:33:54 +08:00
AllinGo
b94d23d1b4
support go 1.15 (#2463) 2020-08-12 09:28:51 +08:00
Florian Polster
815e1ce281
Prevent panic in Context.GetQuery() when there is no Request (#2412)
Co-authored-by: thinkerou <thinkerou@gmail.com>
2020-08-08 20:32:19 +08:00
lantw44
30b5f7e2d7
binding: avoid 2038 problem on 32-bit architectures (#2450)
Function setTimeField calls strconv.ParseInt with bit size 0 when
parsing Unix time, which means it is equivalent to specifying 32 on
32-bit architectures. This causes the function to suffer from the year
2038 problem. To fix it and keep the behavior the same on both 32-bit
and 64-bit architectures, explicitly specify bit size 64.

Co-authored-by: thinkerou <thinkerou@gmail.com>
2020-08-08 17:31:08 +08:00
John Bampton
cf8b583db4
Fix spelling (#2451) 2020-08-04 07:04:06 +08:00
森 優太
c6d6df6d5a
Docs: Update README.md Custom Validator sample code (#2448)
Co-authored-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2020-08-01 15:26:29 +08:00
Hiroyuki Tanaka
44e78a78d4
README: Change badge to pkg.go.dev (#2449) 2020-08-01 15:03:33 +08:00
Johnny Dallas
4cabdd303f
Add CustomRecovery builtin middleware (#2322)
* Add CustomRecovery and CustomRecoveryWithWriter methods

* add CustomRecovery example to README

* add test for CustomRecovery

* support RecoveryWithWriter(io.Writer, ...RecoveryFunc)
2020-07-09 09:40:00 +08:00
Vas N
5e40c1d49c
DebugPrintRouteFunc() unit test (#2395)
Co-authored-by: thinkerou <thinkerou@gmail.com>
2020-05-25 21:47:06 +08:00
bestgopher
c9b8535817
Rename some variables (#2393) 2020-05-25 20:13:09 +08:00
Miles
5f261fa752
Add a redirect sample for POST method (#2389)
* Add a redirect sample for POST method

Refer to issue https://github.com/gin-gonic/gin/issues/444

* put an empty line before 1396

Co-authored-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2020-05-24 11:37:32 +08:00
bestgopher
9221381443
remove a unused type SecureJSONPrefix (#2391) 2020-05-24 10:58:28 +08:00
thinkerou
2773ce6e60
add copyright (#2388)
Co-authored-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2020-05-23 22:52:01 +08:00