Commit Graph

63 Commits

Author SHA1 Message Date
bestgopher d4022e3f02 fix(routergroup.go): disallow that a method don't match regEnLetter
Signed-off-by: bestgopher <84328409@qq.com>
2023-09-13 23:14:23 +08:00
Alireza (Pure) e02ae6ae61
chore(router): match method added to routergroup for multiple HTTP methods supporting (#3464) 2023-02-06 15:46:42 +08:00
Jesse 51aea73ba0
fix: modify interface check way (#3327) 2022-10-20 00:49:19 +08:00
Konstantin Runov 814cd188eb
FIX TYPO: Gin by default useR -> ... useS (#3324) 2022-09-18 21:59:57 +08:00
Dave Rolsky 2ae6157049
Fix typos in RouterGroup method docs (#3302)
There were a number of spots referring to a variable named "handle" that should be "handlers".
2022-08-31 14:34:33 +08:00
thinkerou b04917c53e
chore: upgrade golangci-lint and fix golangci-lint error (#3278) 2022-08-15 21:38:20 +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
thinkgo 417b142703
feat: add StaticFileFS (#2749)
* RouterGroup.StaticFileFS added
add StaticFileFS ad README

* fix Static content mistake

* update README `tab`
improve StaticFile and StaticFileFS code, use staticFileHandler
2022-03-18 09:52:23 +08:00
bestgopher 3757142584
Update routergroup.go (#3056) 2022-02-14 14:39:57 +08:00
heige eb75ce0ff5
adjust the routergroup Any method (#2701) 2021-10-24 09:31:13 +08:00
Lanco f96678cb6b
use assert1 func (#2783) 2021-07-11 14:38:45 +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
bestgopher c9b8535817
Rename some variables (#2393) 2020-05-25 20:13:09 +08:00
thinkerou d5f12ac6d7
use http method constant (#2155)
* use http method constant

* fix typo
2019-11-29 07:50:49 +08:00
Shamus Taylor aabaccbba2 Close files opened in static file handler (#2118)
* Close files opened in static file handler

* Do not use defer
2019-10-31 22:52:02 +08:00
Sai 4a23c4f7b9 fix #1804 which is caused by calling middleware twice. (#1805)
Fix: https://github.com/gin-gonic/gin/issues/1804

`allNoRoute` contains middlewares such as `gin.Logger`, `gin.Recovery`, so on.  The correct code is to use `noRoute`.

cc: @MetalBreaker
2019-03-11 10:52:47 +08:00
John Bampton d8fb18c33b Fix case of GitHub (#1726) 2018-12-31 09:02:53 +08:00
thinkerou 98c7ac7202
fix bug (#1682) 2018-12-05 13:36:49 +08:00
MetalBreaker b97ccf3a43 Router: Route StaticFS() not found to Router's NoRoute() (#1663)
Closes #1220
2018-11-26 23:01:51 +08:00
Barnabus 7a374f9a47 Fix typos (#1626) 2018-11-05 14:17:04 +08:00
田欧 f2cd3fcb2a chore: fix typo and add a little anotation (#1562) 2018-09-20 11:53:58 +08:00
田欧 6db092f778 chore: add some annotations (#1550)
ref #1075 should all annotations and can close #1075 .
2018-09-15 15:21:54 +08:00
田欧 6c6d97ba2e remove hardcode instead of http status value (#1411) 2018-06-26 17:21:32 +08:00
MW Lim c2f083fc95 minor typo in routergroup.go (#1360) 2018-05-31 11:41:45 +08:00
田欧 a8fa424ae5 update comment (#1057) 2017-08-16 11:55:50 +08:00
田欧 d535fcd598 separate type define (#975) 2017-07-05 02:47:36 -05:00
Manu Mtz-Almeida e8bc8f48e9 Merge branch 'master' into develop
Conflicts:
	README.md
	gin.go
	routergroup.go
2015-08-16 18:38:13 +02:00
Manu Mtz-Almeida fc5e355724 BasePath is not longer an exported field, but a method instead 2015-07-08 04:27:23 +02:00
Javier Provecho Fernandez 7c0c427b2d Fix #252 typo (middlewares -> middleware) 2015-07-03 20:12:01 +02:00
Manu Mtz-Almeida 8f3047814e Comments + IRoutes + IRouter + unexported AbortIndex 2015-07-02 20:24:54 +02:00
Manu Mtz-Almeida 9268afb15d Cosmetic changes 2015-06-26 16:05:09 +02:00
Manu Mtz-Almeida 9e44079756 RoutesInterface includes Group() 2015-06-26 16:01:35 +02:00
Steeve Chailloux 4238c5b83d make routesInterface exported 2015-06-23 15:57:21 -05:00
Manu Mtz-Almeida 4998bc2b2e Fixes pipeline API 2015-06-11 01:02:38 +02:00
Manu Mtz-Almeida 86c75ce95d Adds collection pipeline pattern 2015-06-10 17:10:34 +02:00
Manu Mtz-Almeida 92475baba6 Adds more units tests 2015-06-04 04:50:40 +02:00
Manu Mtz-Almeida 1228b03914 Fixing some unit tests 2015-05-31 18:35:28 +02:00
Manu Mtz-Almeida aa9078bc73 More benchmarks 2015-05-31 15:55:10 +02:00
Manu Mtz-Almeida cd92bf4385 Adds panic when using too many handlers 2015-05-31 04:34:21 +02:00
Manu Mtz-Almeida 98951c44aa Return 404 when listing empty directory 2015-05-24 17:03:44 +02:00
Manu Mtz-Almeida fcfe65685a Refactored StaticFS()
- different approach to disable directory listing.
2015-05-24 16:29:55 +02:00
Manu Mtz-Almeida cac77e04e3 Adds option for listing directory files + better unit tests 2015-05-21 17:01:13 +02:00
Manu Mtz-Almeida 72f200ac56 Adds StaticFile() 2015-05-21 16:59:58 +02:00
Manu Mtz-Almeida c2abae6840 debugPrintRoute() is called in the lowest layer of abstraction 2015-05-20 11:32:39 +02:00
Manu Mtz-Almeida 138e4b49bf Using WrapH() internally. 2015-05-20 11:30:22 +02:00
Manu Mtz-Almeida 5d3fbc377c Adds StaticFS(path, filesystem) 2015-05-20 10:50:59 +02:00
Manu Mtz-Almeida e59475c615 Drops LINK and UNLINK shortcuts 2015-05-20 00:32:06 +02:00
Manu Mtz-Almeida 022304e7d9 Better API for RouteGroup.Handle() 2015-05-19 23:22:35 +02:00
Manu Mtz-Almeida 53329e4646 Testing new Any routing. 2015-05-19 23:00:55 +02:00
Manu Mtz-Almeida 3066c35754 Renames RouterGroup.absolutePath to .BasePath 2015-05-16 18:08:19 +02:00