* Fixes for some of the failing tests
* Add readiness check to serverStart()
* Use net/http client for tests listen test
* Use different key for this test
* Run Proxy Middleware tests in parallel. Add nil checks for potential issues pointed by nilaway
* Enable parallel client tests
* Do not run timing sensitive tests in parallel
* Remove TODO
* Revert Test_Proxy_DoTimeout_Timeout, and remove t.Parallel() for it
* Do not calculate favicon len on each handler call
* Revert logic change
* Increase timeout of SaveFile tests
* Do not run time sensitive tests in parallel
* The Agent can't be run in parallel
* Do not run time sensitive tests in parallel
* Fixes based on uber/nilaway
* Revert change to Client test
* Run parallel
* Update client_test.go
* Update client_test.go
* Update cache_test.go
* Update cookiejar_test.go
* Remove parallel for test using timeouts
* Remove t.Parallel() from logger middleware tests
* Do not use testify.require in a goroutine
* Fix import, and update golangci-lint
* Remove changes to template_chain.go
* Run more tests in parallel
* Add more parallel tests
* Add more parallel tests
* SetLogger can't run in parallel
* Run more tests in parallel, fix issue with goroutine in limiter middleware
* Update internal/storage/memory, add more benchmarks
* Increase sleep for csrf test by 100 milliseconds. Implement asserted and parallel benchmarks for Session middleware
* Add 100 milliseconds to sleep during test
* Revert name change
* fix: Inconsistent and flaky unit-tests
* fix: Inconsistent and flaky unit-tests
* fix: Inconsistent and flaky unit-tests
* fix: Inconsistent and flaky unit-tests
* fix: Inconsistent and flaky unit-tests
* fix: Inconsistent and flaky unit-tests
* fix: Inconsistent and flaky unit-tests
* fix: Inconsistent and flaky unit-tests
* fix: Inconsistent and flaky unit-tests
* fix: Inconsistent and flaky unit-tests
---------
Co-authored-by: M. Efe Çetin <efectn@protonmail.com>
Co-authored-by: René <rene@gofiber.io>
* Update listen.go (unform INFO prints at startip + cosmetics)
BEFORE:
```
_______ __
/ ____(_) /_ ___ _____
/ /_ / / __ \/ _ \/ ___/
/ __/ / / /_/ / __/ /
/_/ /_/_.___/\___/_/ v3.0.0-beta.1
--------------------------------------------------
INFO Server started on http://127.0.0.1:8003 (bound on host 0.0.0.0 and port 8003)
INFO Application name: TEST APP
INFO Total handlers count: 5
INFO Prefork: Disabled
INFO PID: 2342
INFO Total process count: 1
20:49:50 | 200 | 593.769µs | 123.123.123.123 | GET | /
```
AFTER:
```
_______ __
/ ____(_) /_ ___ _____
/ /_ / / __ \/ _ \/ ___/
/ __/ / / /_/ / __/ /
/_/ /_/_.___/\___/_/ v3.0.0-beta.1
--------------------------------------------------
INFO Server started on: http://127.0.0.1:8003 (bound on host 0.0.0.0 and port 8003)
INFO Application name: TEST APP
INFO Total handlers count: 5
INFO Prefork: Disabled
INFO PID: 2342
INFO Total process count: 1
20:49:50 | 200 | 593.769µs | 123.123.123.123 | GET | /
```
* fix spacer
* fix indentation for fiber version
* fix linting
* fix linting #2
* fix listen_test.go to match newly expected output.
* fix test again
---------
Co-authored-by: root <root@clicon.hosting-hotmann.de>
Co-authored-by: Martin <martin@hotmann.de>
* feat: add a variadic parameter on OnListenHandler
* feat: accept a variadic ListenData in startupProcess parameters
* feat: add startupProcess variadic ListenData to function
* refactor: use runOnListenHooks instead of startupProcess for run onListenHooks
* refactor: remove variadic to make codes straightforward
* fix: add listen data to runOnListenHooks
* test: add listenData parameter to OnListen tests
* docs: update OnListen docs
* fix: remove unused codes
* docs: add tabs to onListen hook example
* docs: add if statement to docs example
* docs: replace fmt with log
* docs: fix return value of example
* docs: make 0.0.0.0 string a constant
* fix: change type of TLS from string to bool
* fix: return bool instead of a string
* docs: update example with new TLS type
* fix: change name tls to isTls to prevent shadowing tls variable
* style: make syntax of onListen example shorter
* refactor: remove unused no-lint comment
* refactor: change isTls to isTLS
* fix: add nolint for isTLS bool param
* Update listen.go
---------
Co-authored-by: M. Efe Çetin <efectn@protonmail.com>
* 🐛 bug: fix onListen hooks when they are used with prefork mode
🐛 bug: fix onListen hooks when they are used with prefork mode
* 🐛 bug: fix onListen hooks when they are used with prefork mode
* internal: revert linting changes
Changes to the internal package should not have been made in 167a8b5e9421e0ab51fbf44c5621632f4a1a90c5.
* middleware/monitor: revert changes to exported field "ChartJSURL"
This is a breaking change introduced in 167a8b5e9421e0ab51fbf44c5621632f4a1a90c5.
* middleware/monitor: fix error checking
Fix the errorenous error checking introduced in 167a8b5e9421e0ab51fbf44c5621632f4a1a90c5.
* 🐛 Bug: Fix issues introduced in linting PR #2319
* 🐛 Bug: Fix issues introduced in linting PR #2319
* Bug: Fix issues introduced in linting PR #2319
---------
Co-authored-by: René Werner <rene@gofiber.io>
* 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
* Add figlet text for Fiber startup message
* Fiber figlet text is added to beginning of the startup message.
Signed-off-by: Gökhan Özeloğlu <gokhan.ozeloglu@deliveryhero.com>
* Refactor startup message
* Table is removed. Logs are added.
* Test cases refactored.
Signed-off-by: Gökhan Özeloğlu <gokhan.ozeloglu@deliveryhero.com>
* Add colorful log messages
* Used custom color codes to make logs colorful.
* Added a new test case.
* Fixed broken test case after changes.
* Added some color codes as a variable.
* Handled Windows case with init() function. Color codes are set empty string.
Signed-off-by: Gökhan Özeloğlu <gokhan.ozeloglu@deliveryhero.com>
* Change color text logic
* Color codes are taken from config.
* Version is added to figlet text.
* Reordered "server started on" message.
* Test cases are refactored.
Signed-off-by: Gökhan Özeloğlu <gokhan.ozeloglu@deliveryhero.com>
* Add if condition for Windows
* OS checked in tests for Windows machines.
Signed-off-by: Gökhan Özeloğlu <gokhan.ozeloglu@deliveryhero.com>
* some improvements
* Fix startup message tests
Signed-off-by: Gökhan Özeloğlu <gokhan.ozeloglu@deliveryhero.com>
* colorize PIDs
Signed-off-by: Gökhan Özeloğlu <gokhan.ozeloglu@deliveryhero.com>
Co-authored-by: Muhammed Efe Çetin <efectn@protonmail.com>
* 🐛 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 #2034
Co-authored-by: wernerr <rene@gofiber.io>
* 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
* add black color to defaultColors overriding function, fix (again) padding in startupMessage
* 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