Commit Graph

1801 Commits

Author SHA1 Message Date
axiaoxin 1a2bc0e7cb
setted typo fix: There’s no such word as `setted`, `set` is set, set, setting (#2886) 2021-09-30 10:04:28 +08:00
Notealot 6d75aba83f
Quick Fix c.ClientIP() mistakely parsing to 127.0.0.1 for who not using r.Run() to run http server (#2832) 2021-09-29 19:26:02 +08:00
joeADSP 97b3c0d88a
Fix grammatical and spelling errors in context.go (#2883) 2021-09-29 07:35:06 +08:00
Alexander Melentyev f469c1be39
Add gosec (#2882) 2021-09-28 11:37:31 +08:00
寻寻觅觅的Gopher d6534ccf38
turn on HandleMethodNotAllowed when using NoMethod #2871 (#2872) 2021-09-28 09:45:50 +08:00
Aravinth Sundaram ef168679ce
Correcting grammatical errors in README file (#2880) 2021-09-28 08:57:36 +08:00
dependabot[bot] e052bf31aa
Bump github.com/json-iterator/go from 1.1.11 to 1.1.12 (#2865)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-09-21 15:23:31 +08:00
Matthieu MOREL 71f7087097
golangci(lint) : more linters (#2870) 2021-09-21 15:22:21 +08:00
Henry Yee 3a6f18f32f
fixed SetOutput() panics on go 1.17 (#2861)
* fixed SetOutput() panics on go 1.17

* update go.sum
2021-09-08 11:30:55 +08:00
wssccc ae349b4015
Fix typo (#2860) 2021-09-07 13:05:19 +08:00
Tevic eab47b5423
fix: check obj type in protobufBinding (#2851)
* fix: check obj type in protobufBinding

* fix: UnitTest for invalid proto obj
2021-09-07 10:10:32 +08:00
filikos deb83b6365
gin.Context.SetParam shortcut for e2e tests (#2848)
* Added SetParam shortcut for e2e tests, added SetParam test

* Adjusted naming and formatting

* fixed typo
2021-09-07 10:08:45 +08:00
Alexander Melentyev 5c62979390
bump golangci-lint version (#2858) 2021-09-07 06:43:42 +08:00
dependabot[bot] abcf32f5ad
Bump github.com/goccy/go-json from 0.7.7 to 0.7.8 (#2859)
Bumps [github.com/goccy/go-json](https://github.com/goccy/go-json) from 0.7.7 to 0.7.8.
- [Release notes](https://github.com/goccy/go-json/releases)
- [Changelog](https://github.com/goccy/go-json/blob/master/CHANGELOG.md)
- [Commits](https://github.com/goccy/go-json/compare/v0.7.7...v0.7.8)

---
updated-dependencies:
- dependency-name: github.com/goccy/go-json
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-09-07 06:43:08 +08:00
Bo-Yi Wu a550c568d7
chore: Add go1.17 for testing (#2828)
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2021-09-06 08:21:03 +08:00
thinkerou e4c026e2a1
Fix go1.17 test error (#2856) 2021-09-06 08:10:06 +08:00
dependabot[bot] 30cdbfcf4c
Bump github.com/goccy/go-json from 0.7.6 to 0.7.7 (#2849)
Bumps [github.com/goccy/go-json](https://github.com/goccy/go-json) from 0.7.6 to 0.7.7.
- [Release notes](https://github.com/goccy/go-json/releases)
- [Changelog](https://github.com/goccy/go-json/blob/master/CHANGELOG.md)
- [Commits](https://github.com/goccy/go-json/compare/v0.7.6...v0.7.7)

---
updated-dependencies:
- dependency-name: github.com/goccy/go-json
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-08-31 09:58:54 +08:00
Lanco 4e7584175d
minor tweaks,optimize code (#2788) 2021-08-23 01:32:41 +08:00
Alexander Melentyev dfc25f91e0
Add short func with named return (#2837) 2021-08-22 09:29:51 +08:00
Alexander Melentyev 8200903817
Delete deadcode exclude rules (#2838) 2021-08-21 21:46:52 +08:00
Alexander Melentyev c303020561
bump golangci-lint (#2839) 2021-08-21 21:45:30 +08:00
Alexander Melentyev 527d950252
Delete unused arg (#2834) 2021-08-21 14:59:17 +08:00
Alexander Melentyev f3a6b69fd0
Delete unused static const (#2830) 2021-08-20 08:38:24 +08:00
Matthieu MOREL a46dee3a9a
Update .golangci.yml (#2829) 2021-08-19 16:16:18 +08:00
Matthieu MOREL 435a76b735
chore(ci): update dependencies (#2827)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Matthieu MOREL <mmorel-35@users.noreply.github.com>
2021-08-19 15:46:31 +08:00
goqihoo b463b1c2a1
Update README.md (#2804)
1. c.FullPath() == "/user/:name/*action"
get following error:
evaluated but not used 
2. c.String(http.StatusOK, "The available groups are [...]", name)
get following error:
undefined: name
2021-08-11 09:42:25 +08:00
Bo-Yi Wu 6ebb945bd7
docs: release v1.7.3 (#2802)
* docs: release v1.7.3

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

* fix: format

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2021-08-03 10:26:26 +08:00
wei 9a575a4c05
fallback Context.Deadline() Context.Done() Context.Err() to Context.Request.Context() (#2769)
* fallback Context.Deadline() Context.Done() Context.Err() to Context.Request.Context()

* update comments wording
2021-08-01 00:46:53 +08:00
Eren A. Akyol 11aa11a656
fix readability in recovery test (#2797) 2021-07-27 07:59:53 +08:00
qm012 0a55865c3f
fix #2786 (#2796)
* update match rule

* add comments
2021-07-26 10:07:54 +08:00
qm012 d4ca9a0fb1
fix #2762 (#2767) 2021-07-23 06:58:15 +08:00
ziheng caf2802593
Improve router group tests (#2787) 2021-07-13 09:44:19 +08:00
Lanco f96678cb6b
use assert1 func (#2783) 2021-07-11 14:38:45 +08:00
ziheng 3116a2d7a1
use std http method constant instead of raw string (#2782) 2021-07-09 10:30:44 +08:00
ziheng c7a28f8532
use bit shift operation instead of division (#2776) 2021-07-06 16:37:14 +08:00
Helios 9d2883ef47
update the version of validator in the comment (#2780)
Co-authored-by: shangyilong <shangyilong@zuoyebang.com>
2021-07-06 16:36:32 +08:00
Lanco 9c27053243
byte alignment (#2774) 2021-07-04 10:37:13 +08:00
Lanco 372cc4a010
Fix typo (#2772) 2021-07-02 09:58:43 +08:00
voidman 690aa2b1b9
feat(binding): support custom struct tag (#2720)
* feat(binding): support custom struct tag

Add function `binding.MapFormWithTag` (#2719)

* doc: add 'bind form-data with custom struct tag'

Add 'Bind form-data request with custom struct and custom tag' section (#2719)

* test(binding): add test for MapFromWithTag
2021-06-30 00:53:56 +08:00
ziheng e3ee01d185
improve sliceValidateError.Error performance using switch and strings.Builder (#2765)
fix missing nil pointer check

use simpler switch case

add missing tests

use for-loop instead of range

add benchmark test codes
2021-06-28 22:05:29 +08:00
raymonder jin 1d0f938f28
Fix insufficient slice check (#2755) 2021-06-25 13:22:01 +08:00
ziheng f2bbdfe9f2
Use buf.String() instead of string(buf.Bytes()) (#2764) 2021-06-25 12:14:06 +08:00
wei 7834a03e84
gin.Context with fallback value from gin.Context.Request.Context() (#2751)
* Update tree.go (#2659)

delete more "()"

* updated comments for Get function for params (#2756)

* ci: add github action workflows (#2596)

* ci: add github action workflows

* test: fixed the TestUnixSocket test on windows (#20)

* ci: add github action workflows (#18)

* Remove .travis.yml

* ci: replace GITTER_ROOM_ID and upload coverage every time you go test

* ci: update coverage using codecov/codecov-action@v1

* Merge branch 'master' into github-actions

* repo: replace travis ci to github actions

* ci: add go version 1.16

* fix: go install requires a specific version

* chore(ci): remove go 1.12 support

* chore(ci): remove os windows-latest

Co-authored-by: thinkerou <thinkerou@gmail.com>
Co-authored-by: Bo-Yi Wu <appleboy.tw@gmail.com>

* Setting trusted platform using an enum-like (#2739)

* gin.Context with fallback value from c.Request.Context()

* add test case

Co-authored-by: youzeliang <youzel@126.com>
Co-authored-by: Ashwani <ashwanisharma686@gmail.com>
Co-authored-by: Jeff <laojianzi1994@gmail.com>
Co-authored-by: thinkerou <thinkerou@gmail.com>
Co-authored-by: Bo-Yi Wu <appleboy.tw@gmail.com>
Co-authored-by: Alessandro (Ale) Segala <43508+ItalyPaleAle@users.noreply.github.com>
2021-06-24 16:33:14 +08:00
ziheng 09f6cff92a
skip unnecessary variable assignment in timeFormat (#2761) 2021-06-24 15:31:38 +08:00
ziheng be860ec157
fix typo and add comments (#2760) 2021-06-24 13:07:49 +08:00
Alessandro (Ale) Segala dd8a27c0b6
Setting trusted platform using an enum-like (#2739) 2021-06-24 08:58:10 +08:00
Jeff fb8a113f8d
ci: add github action workflows (#2596)
* ci: add github action workflows

* test: fixed the TestUnixSocket test on windows (#20)

* ci: add github action workflows (#18)

* Remove .travis.yml

* ci: replace GITTER_ROOM_ID and upload coverage every time you go test

* ci: update coverage using codecov/codecov-action@v1

* Merge branch 'master' into github-actions

* repo: replace travis ci to github actions

* ci: add go version 1.16

* fix: go install requires a specific version

* chore(ci): remove go 1.12 support

* chore(ci): remove os windows-latest

Co-authored-by: thinkerou <thinkerou@gmail.com>
Co-authored-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2021-06-23 13:10:49 +08:00
Ashwani a8857ed70a
updated comments for Get function for params (#2756) 2021-06-23 11:36:24 +08:00
youzeliang 61a0cda75a
Update tree.go (#2659)
delete more "()"
2021-06-23 06:44:39 +08:00
tyltr 34ce2104ca
optimize code and reduce code cyclomatic complexity (#2737)
* optimize code and reduce code cyclomatic complexity

* optimize if-condtion

Co-authored-by: thinkerou <thinkerou@gmail.com>
2021-06-03 20:12:51 +08:00