1
0
mirror of https://github.com/gofiber/fiber.git synced 2025-04-27 13:14:31 +00:00

180 Commits

Author SHA1 Message Date
nickajacks1
3c4509f054
chore: Fix remaining testifylint errors () 2024-01-22 08:34:15 +01:00
Muhammed Efe Cetin
6ea4d81331
Merge branch 'master' into v3-beta 2023-11-07 20:22:31 +03:00
M. Efe Çetin
94acde8fe5
🐛 bug: fix method validation on route naming ()
* 🐛 bug: fix route naming issue when using same path for different methods

* fix linter

* add new testcase for HEAD route

* add comments to tests

* fix tests
2023-10-23 09:12:52 +02:00
M. Efe Çetin
d736d3a644
🐛 bug: fix path checking on route naming ()
* 🐛 bug: fix path checking on route naming

* fix several tests

* fix several tests
2023-10-16 09:02:53 +02:00
M. Efe Çetin
6e443f6026
refactor: use utils.AssertEqual instead of t.Fatal on some tests () 2023-09-28 14:40:42 +02:00
Muhammed Efe Cetin
75bb02b87e
Merge remote-tracking branch 'origin/master' into v3-beta 2023-08-05 22:02:01 +03:00
Chris Hurst
c955d76f5d
🐛 bug: fix middleware naming and returned values of group methods ()
* Bug fix: route names not updating

* fixed lint error

* updated tests with renaming edge case

* fix group naming partially

* add todo

* fix todo

* fix todo

---------

Co-authored-by: Muhammed Efe Çetin <efectn@protonmail.com>
2023-06-05 13:00:51 +02:00
RW
9feaf2296e
🚀 Improve error handling for net error(s) ()
* improve error handling for net error(s)
fixes: reverse proxy support 

* Update app.go

Co-authored-by: leonklingele <git@leonklingele.de>

* improve error handling for net error(s)
fixes: reverse proxy support 

* improve error handling for net error(s)
fixes: reverse proxy support 

* improve error handling for net error(s)
fixes: reverse proxy support 

---------

Co-authored-by: leonklingele <git@leonklingele.de>
2023-04-21 13:41:19 +02:00
Juan C. Yamacho H
562d15db86
🚀 Feature: Public ShutdownWithContext ()
* feat: public shutdown with context

* docs: add server shutdown option

* chore: revert spacing changes

* test: app shutdown with context
2023-04-09 21:08:03 +08:00
Muhammed Efe Çetin
41866cd3dd
👷 v3 (ci): fix some linter warnings 2023-03-06 17:35:39 +03:00
Muhammed Efe Çetin
3168a60605
👷 v3 (ci): fix some linter warnings 2023-02-09 23:15:21 +03:00
Muhammed Efe Çetin
c2749c36c2
👷 v3 (ci): fix some linter warnings 2023-02-09 22:33:45 +03:00
Muhammed Efe Çetin
088cde594d
Merge remote-tracking branch 'origin/master' into v3-beta 2023-02-05 23:43:42 +03:00
M. Efe Çetin
2820aef585
🧹 chore: add go 1.20 to ci and readmes ()
*  chore: add go 1.20 to ci and readmes

* 🧹 chore: add go 1.20 to ci and readmes

* update linter

* fix linter

* fix benchmarks

* fix benchmarks

* fix benchmarks
2023-02-02 23:01:37 +03:00
leonklingele
167a8b5e94
🚀 Feature: Add and apply more stricter golangci-lint linting rules ()
* golangci-lint: add and apply more stricter linting rules

* github: drop security workflow now that we use gosec linter inside golangci-lint

* github: use official golangci-lint CI linter

* Add editorconfig and gitattributes file
2023-01-27 09:01:37 +01:00
M. Efe Çetin
5406560033
🧹 chore: make most tests parallel ()
* 🧹 chore: make most tests parallel

* revert some tests

* revert some tests

* revert some tests
2023-01-15 23:21:37 +08:00
pj
8889cea116
feat: add ShutdownWithTimeout function ()
* add ShutdownWithTimeout function

* no message

* fix func documentation

* test: add Test_App_ShutdownWithTimeout

Co-authored-by: rocketlaunchr-cto <rocketlaunchr.cloud@gmail.com>
Co-authored-by: kinggo <lilong.21@bytedance.com>
2022-12-19 23:40:43 +08:00
leonklingele
6334f2c9ff
🚀 v3 Feature: Make app.Test accept a time.Duration timeout ()
app: make app.Test accept a time.Duration timeout

Cases found by running semgrep with an empty .semgrepignore file

    semgrep --lang=go -e '$O.Test($X, $Y)'
2022-12-12 20:39:52 +01:00
kinggo
a9ddef7a20
optimize: add more detail error message in serverErrorHandler () 2022-12-11 02:28:39 +08:00
Muhammed Efe Çetin
77d14848b8
v3: fix tests 2022-11-27 23:00:09 +03:00
Muhammed Efe Çetin
c62dd16e8d
Merge remote-tracking branch 'origin/master' into v3-beta 2022-11-27 20:34:48 +03:00
M. Efe Çetin
8aeb147c75
feature: add multiple-prefix support to app.Use() and group.Use() () 2022-11-13 16:56:34 +01:00
Rafi Muhammad
878c9549d8
Feat: Register custom methods ()
* Implementing register custom methods

* Return timout time to 1000

* Update app_test.go

* Change update stack to add custom request method

* Feat: Register custom methods 

* Feat: Register custom methods 

* update logic

* optimization.

* fix

Co-authored-by: Rafi Muhammad <rafi.muhammad@mekari.com>
Co-authored-by: RW <rene@gofiber.io>
Co-authored-by: Muhammed Efe Çetin <efectn@protonmail.com>
2022-11-11 08:23:30 +01:00
M. Efe Çetin
581af0052d
🐛 bug: fix naming of routes inside groups ()
* 🐛 bug: fix naming of routes inside groups

* fix tests

* bug: fix naming of routes inside groups

Co-authored-by: René Werner <rene@gofiber.io>
2022-11-09 16:03:16 +01:00
pj
709e0952e2
v3 (feature): router interface changes ()
* Add(methods []string, path string, handlers ...Handler) Router

* - proposed Router interface changes

Co-authored-by: rocketlaunchr-cto <rocketlaunchr.cloud@gmail.com>
2022-11-01 08:45:43 +01:00
Muhammed Efe Çetin
9428befb9c
Merge remote-tracking branch 'origin/master' into v3-beta 2022-10-28 17:26:17 +03:00
M. Efe Çetin
691d2e6ad5
🗑️ deprecate: go 1.14 & go 1.15 support deprecation ()
* 🗑️ deprecate: go 1.14 & go 1.15 support deprecation
https://github.com/valyala/fasthttp/pull/1379

* fix tests
2022-10-26 11:51:50 +02:00
M. Efe Çetin
156b81c768
🐛 bug: improve mounting behavior ()
* 🐛 bug: fix mounting doesn't work if when to declare it before routes

* 🐛 bug: fix mounting doesn't work if when to declare it before routes

* 🐛 bug: fix mounting doesn't work if when to declare it before routes

* 🐛 bug: fix mounting doesn't work if when to declare it before routes

* 🐛 bug: fix mounting doesn't work if when to declare it before routes

* add onMount hooks, mountPath like express.js, better behavior for onName, onRoute, onGroup, onGroupName hooks on mounted apps

* add comment

* use once

* fix views when both app and sub-app have view engine, better behavior for mount path

* fix tests

* fix tests

* make some tasks

* make some tasks
2022-10-25 07:51:44 +02:00
Nathan Faucett
6a5fc64edd
add CacheControl to Static config ()
* add CacheControl to Static config

* change config name to ModifyResponse

Co-authored-by: Nathan Faucett <nfaucett@utility.com>
2022-10-05 18:14:37 +02:00
Amir Hossein
66d5b195c5
fix unhandled errors and update code comments to help the IDEs ()
* fix unhandled errors

* fix unhandled error in cache package test

* omit variable type

* omit variable type

* rename variable because collide with the imported package name

* handle file error on closing

* fix unhandled in common_linux.go

* fix unhandled errors in helpers_test.go

* fix unhandled errors in listen_test.go

* remove unused parameter in emptyHandler method

* refactor path.go

* unhandled error in hooks test

* fix unhandled errors in app_test.go

* fix unhandled errors in ctx_test.go

*  fix unhandled errors in helpers_test.go

* revert app_test.go

* remove redundant parentheses and update comments

* update code comment for helping ide

* update code comment for helping ide

* fix unhandled error in app_test.go

* update code comments for helping IDEs

* fix unhandled errors in app_test.go

* update code comment for helping the IDEs
2022-09-28 14:26:20 +02:00
kinggo
ff348b5e92
feat: Add GetRoutes ()
feat: Add GetRoutes
2022-09-27 09:02:38 +02:00
M. Efe Çetin
305bb072be
🧹 tidy up: fix linter errors for tests () 2022-09-19 08:33:58 +02:00
Amir Hossein
1d773c7f3c
update code comments for helping IDEs and fix unhandled error in test ()
* fix unhandled errors

* fix unhandled error in cache package test

* omit variable type

* omit variable type

* rename variable because collide with the imported package name

* handle file error on closing

* fix unhandled in common_linux.go

* fix unhandled errors in helpers_test.go

* fix unhandled errors in listen_test.go

* remove unused parameter in emptyHandler method

* refactor path.go

* unhandled error in hooks test

* fix unhandled errors in app_test.go

* fix unhandled errors in ctx_test.go

*  fix unhandled errors in helpers_test.go

* revert app_test.go

* remove redundant parentheses and update comments

* update code comment for helping ide

* update code comment for helping ide

* fix unhandled error in app_test.go

* update code comments for helping IDEs
2022-09-18 15:32:54 +02:00
Jinquan Wang
093882cfdf
v3 (feature): new Route method ()
* 🎨 perf: change name to add new feature

*  feat add route

* 🎨 perf: rollback name

* 🎨 perf: change file name

* fix: fix errors caused by register

* 🎨 perf: change filed to private and change comment

* feat: interface is better

* 🎨 perf: change type name

* deeper tests

Co-authored-by: Muhammed Efe Çetin <efectn@protonmail.com>
2022-09-18 11:35:57 +02:00
M. Efe Çetin
281e2f0046
v3 (feature): merge Listen methods & ListenConfig ()
*  v3: new Start method for app

*  v3: new Start method for app

*  v3: new Start method for app

*  v3: new Start method for app

*  v3: new Start method for app

*  v3: new Start method for app

* fix tests

* improve graceful shutdown

* update

* Start -> Listen

* rename test funcs.

* Add Test_Listen_Graceful_Shutdown test.

* add OnShutdownSuccess

* fix tests

* fix tests

* split listen & listener

* typo

* Add retry logic to tests

* Add retry logic to tests

* Add retry logic to tests

* Add retry logic to tests

Co-authored-by: René Werner <rene@gofiber.io>
2022-09-08 07:57:05 +02:00
Jinquan Wang
e8c93e6153
🐛 [Fix]: unhandle in strictmode ()
* fix: unhandle in strictmode

* 🐛 fix: error test

*  chore: add testcases for strictrouting

*  chore: fix test case
2022-09-07 11:05:37 +02:00
Muhammed Efe Çetin
78c6197430
♻️ v3 (enhancement): remove automatic HEAD method creation from Get()
ref: https://github.com/gofiber/fiber/issues/2026
2022-09-05 17:41:39 +03:00
Amir Hossein
c8b1879b11
fix unhandled errors in app_test.go ()
* fix unhandled errors

* fix unhandled error in cache package test

* omit variable type

* omit variable type

* rename variable because collide with the imported package name

* handle file error on closing

* fix unhandled in common_linux.go

* fix unhandled errors in helpers_test.go

* fix unhandled errors in listen_test.go

* remove unused parameter in emptyHandler method

* refactor path.go

* unhandled error in hooks test

* fix unhandled errors in app_test.go

* fix unhandled errors in ctx_test.go

*  fix unhandled errors in helpers_test.go

* revert app_test.go
2022-09-05 13:11:09 +02:00
Amir Hossein
01ea139da4
🔎 fix unhandled errors ()
fix unhandled errors
2022-08-26 12:02:46 +02:00
M. Efe Çetin
4d28b1e200
🐛 bug: make tlsHandler public to use it with Listener ()
* 🐛 bug: ClientHelloInfo support for app.Listener

* 🐛 bug: ClientHelloInfo support for app.Listener

* fix

* make tlshandler public

* update

* 🐛 bug: make tlsHandler public to use it with Listener 

Co-authored-by: wernerr <rene@gofiber.io>
2022-08-24 09:47:37 +02:00
Trim21
c964fda009
v3(tests): use testify for assertion ()
* replace

* write

* rewrite more

* rewrite

* rewrite

* fix

* rewrite
2022-08-22 07:57:10 +02:00
Muhammed Efe Çetin
4105b008c2
Merge remote-tracking branch 'origin/master' into v3-beta 2022-08-19 14:33:31 +03:00
Muhammed Efe Çetin
28f1df4246
v3: fix Benchmark_AcquireCtx benchmark 2022-08-15 18:27:06 +03:00
M. Efe Çetin
41159296f3
v3: revert " v3 (feature): use any as default Message type of Error struct ()" ()
Revert " v3 (feature): use any as default Message type of Error struct ()"
2022-08-08 08:21:00 +02:00
Trim21
e5eb8d3c98
fix infinitely app.Test ()
* diff

* better code

* err message

* code style

* up

* fix type error

* use time.Timer
2022-08-08 08:18:57 +02:00
wernerr
1cca495c7b try to stabilize Test_Test_Timeout 2022-08-02 08:31:22 +02:00
Maxi_Mega
e49880c5d6
🎨 Fix padding around app name in startup message when containing non-ascii characters ()
* Fix padding around app name in startup message when it contains non-ascii characters

* fix conflict, allow ending space only for odd length strings

* move startup message tests to listen_test.go
2022-08-01 13:16:49 +03:00
M. Efe Çetin
4103f9463d
feature: customizable colors ()
*  feature: customizable colors

*  feature: customizable colors

*  feature: customizable colors
2022-08-01 08:24:37 +02:00
M. Efe Çetin
a458bd344c
v3 (feature): convert fiber.Ctx type to interface ()
*  v3: convert fiber.Ctx type to interface

* update ctx methods

* add new methods to customize ctx, fix some problems

* update comments.

* fix something
2022-07-13 07:48:29 +02:00
M. Efe Çetin
dac929fdee
🧹 client: remove beta warning ()
* 🧹 client: remove beta warning

* Stabilize the Test_Test_Timeout unittest

Co-authored-by: wernerr <rene@gofiber.io>
2022-07-04 07:50:37 +02:00