Commit Graph

12 Commits

Author SHA1 Message Date
Kostadin Plachkov
7d147928ee
fix(gin): data race warning for gin mode (#1580)
* fix: data race warning (#1180)

* Fix the tests

* refactor: remove unnecessary imports and optimize codebase

- Remove unnecessary import of `flag`

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>

* test: refactor test assertions for mode settings

- Update test assertions for mode setting in `mode_test.go`

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>

---------

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
Co-authored-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2024-05-08 09:13:36 +08:00
thinkerou
4b68a5f12a
chore: update go.mod and remove space from copyright (#3158)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-05-28 10:42:28 +08:00
micanzhang
ef687e0db2
feat: automatically SetMode to TestMode when run go test. (#3139)
related issue: https://github.com/gin-gonic/gin/issues/3134
2022-05-14 09:11:35 +08:00
Gaozhen Ying
d6eafcf48a add TestDisableBindValidation (#2071) 2019-09-24 21:44:15 +08:00
Krzysztof Szafrański
f38c30a0d2 feat(binding): add DisallowUnknownFields() in gin.Context.BindJSON() (#2028) 2019-09-06 13:56:59 +08:00
David Zhang
d7daffc26b Use camel case instead of ALL_CAPS (#1419)
* Use camel case instead of ALL_CAPS

* Update mode.go
2019-02-22 12:53:47 +08:00
Mario Kostelac
5d3f30cfc8 Make "" mode being the same as debug mode (#1250)
Not setting mode explicitly sets gin into debug mode, but it does not
make it possible to retrieve gin mode as Debug since it's set to "".
2018-02-23 09:09:33 +08:00
田欧
eeb57848ca update assert param(expect, actual) position (#1177) 2017-11-21 21:18:45 +08:00
whirosan
fb7448f081 feat(binding): add UseNumber() in gin.Context.BindJSON() (#997) close #368
* resolve #368 add option to UseNumber() in gin.Context.BindJSON()

* add test
2017-07-10 10:33:35 +02:00
thinkerou
f843c33370 add test case of mode 2017-07-05 21:05:02 +08:00
thinkerou
2a36eefcff add test case of mode 2017-07-05 20:37:28 +08:00
Manu Mtz-Almeida
4d315f474b More unit tests 2015-04-08 14:24:49 +02:00