79 Commits

Author SHA1 Message Date
M. Efe Çetin
5406560033
🧹 chore: make most tests parallel (#2299)
* 🧹 chore: make most tests parallel

* revert some tests

* revert some tests

* revert some tests
2023-01-15 23:21:37 +08:00
M. Efe Çetin
1898c1f9a7
🐛 bug: fix gopsutil compilation (#2298)
* 🐛 bug: fix gopsutil compilation

* nolint
2023-01-15 15:39:04 +03:00
Serhat Şevki Dinçer
9dfdea45c1
🧹 🐛 fix some warnings, go-ole on mac os (#2280)
* 🧹 fix some warnings

* 🐛 fix go-ole on mac os
2023-01-01 15:16:38 +03:00
RW
e4b3b5c708
Improve interface for custom logger func (#2225)
* - logger: fix custom tag
- use real bytebufferpool dependency instead of the internal

* - logger: fix custom tag
- use real bytebufferpool dependency instead of the internal

* - logger: fix custom tag
- use real bytebufferpool dependency instead of the internal

* - logger: fix custom tag
- use real bytebufferpool dependency instead of the internal
2022-11-18 15:32:56 +01:00
skyenought
e8f8cb647b
Add customTags in logger middleware Config (#2188)
*  Add customTags in logger middleware Config

* improve tags with parameter

* improve logger performance

* improve logger performance

* improve logger performance

* improve logger performance

Co-authored-by: René Werner <rene@gofiber.io>
2022-11-18 13:10:43 +01:00
leonklingele
a0645af1ed
Fix and optimize memory storage (#2207)
* internal/memory: cache timestamp

* internal/memory: ensure to never delete non-expired items

This fixes a TOCTOU problem between a mutex rlock and a mutex lock.

* internal/memory: move costly operations outside of locked area

* internal/storage: cache timestamp

* internal/storage: ensure to never delete non-expired items

This fixes a TOCTOU problem between a mutex rlock and a mutex lock.

* internal/storage: move costly operations outside of locked area
2022-11-14 08:21:03 +01:00
M. Efe Çetin
691d2e6ad5
🗑️ deprecate: go 1.14 & go 1.15 support deprecation (#2172)
* 🗑️ 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 (#2120)
* 🐛 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
kinggo
5fb93fdff6
🐛 fix: multi-byte AppName displays confusion (#2148)
fix: solve wrong print width
2022-10-21 08:30:56 +02:00
RW
ce2d087394
Improve memory storage (#2162)
* improve memory storage code and performance

* improve memory storage code and performance

* improve memory storage code and performance

* improve memory storage code and performance

* improve memory storage code and performance

* improve memory storage code and performance
2022-10-19 16:22:42 +02:00
kinggo
8e8ad95079
feat: support to set client in proxy mw (#2117)
optimize: add WithClient
2022-09-28 14:27:58 +02:00
Amir Hossein
506f0b21c5
fix unhandled error in common_linux.go (#2056)
* 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
2022-08-28 18:45:56 +02:00
Amir Hossein
b86f79eca4
handle file error on closing (#2050)
* 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
2022-08-26 15:46:45 +02:00
Amir Hossein
ffb2d4cb1a
fix unhandled error in cache package tests (#2049)
* 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
2022-08-26 14:10:46 +02:00
M. Efe Çetin
6669ec4486
📝 docs: gofmt & add missing copyright texts (#2013) 2022-08-15 20:25:26 +02:00
M. Efe Çetin
9761f4e797
🐛 bug: fix gopsutil when compiling for bsd. (#1995) 2022-08-03 16:03:17 +02:00
Philippe Bernardino Leite
19c3a3c2c9
z/OS Compatibility (#1904) 2022-05-09 08:40:02 +02:00
M. Efe Çetin
ee65ea5bab
🧹 Use encoding/json (#1851)
* remove goccy/go-json

* fix tests.
2022-04-13 10:45:33 +02:00
Serhat Şevki Dinçer
2f0d745b5a
🆙 bump goccy/go-json to 0.9.6 (#1832) 2022-03-22 13:21:46 +03:00
M. Efe Çetin
10fa3ef6f5
🤖 deps: bump goccy/go-json to v0.9.5 (#1808)
* bump goccy/go-json to 0.9.4

* bump goccy/go-json to 0.9.5
2022-03-05 21:19:03 +01:00
Théotime Lévêque
df85b62a78
🐛 Fix go-json generator. (#1806)
go generate ./... generates panic as import paths have
probably changed over time. This commit free this command
from panics.
2022-03-05 15:39:34 +03:00
M. Efe Çetin
937713e41e
feature: bind support for render (#1754)
* Bind support for Render.

* update

* fix tests

* split Pass-locals-to-views & Bind from Render

* update comments.

* add benchs.

* Update ctx.go

Co-authored-by: hi019 <65871571+hi019@users.noreply.github.com>

* Update ctx.go

* optimize

* switch dictpool.

*  feature: bind support for render
- improve performance

*  feature: bind support for render
- improve performance

Co-authored-by: hi019 <65871571+hi019@users.noreply.github.com>
Co-authored-by: wernerr <rene.werner@verivox.com>
Co-authored-by: wernerr <rene@gofiber.io>
2022-02-12 22:52:24 +01:00
M. Efe Çetin
aa56364445
bump goccy/go-json to 0.9.4 (#1771) 2022-02-12 19:36:48 +01:00
M. Efe Çetin
8bd1509311
Change default gc interval. (#1756) 2022-02-07 13:42:40 +01:00
M. Efe Çetin
c450072f4a
🐛 fix: mounted app views (#1749)
* Fix mounted app views.

* Cleaner structure.

Co-authored-by: RW <rene@gofiber.io>

* remove unnecessary lines.

* Add test case for group-with-mount, remove unnecessary lines.

Co-authored-by: RW <rene@gofiber.io>
2022-02-06 14:58:45 +01:00
M. Efe Çetin
3663c70f6c
📦 Update goccy/go-json to 0.9.3. (#1719)
* Update goccy/go-json to 0.9.3.

* Remove test
2022-01-18 09:48:11 +01:00
M. Efe Çetin
6f34de511e
Update goccy/go-json to 0.9.1. (#1709)
* Update goccy/go-json to 0.9.1.

* fix lint error
2022-01-11 15:23:59 +01:00
vecpeng
f98a9ba405
feature: print all routes message when server starts (#1677)
* feature: print all routes message when server starts

* feature: print all routes message when server starts

* feature:  print all routes message when server starts

* 🐛fix: errors unhandled

* 🐛fix: ignore child process and add some "-" to the table head

* 🐛fix: add printRoutesMessage for listener and listenTLS
2021-12-30 14:13:31 +01:00
M. Efe Çetin
f04ddd41ff
Fix goccy/go-json for go1.18-beta1. (#1673) 2021-12-29 02:12:29 +01:00
M. Efe Çetin
10aa7f7f3b
Update goccy/go-json to 0.8.1 (#1644)
* Update goccy/go-json to 0.8.1

* Fix linter.

* Update error.go
2021-12-06 08:24:57 +01:00
RW
9d01ed1d7c
Update fasthttp from v1.29.0 to v1.31.0 (#1603)
* Update fasthttp from v1.29.0 to v1.31.0

* Update fasthttp from v1.29.0 to v1.31.0
2021-10-28 08:55:59 +02:00
M. Efe Çetin
9eaa8b0c73
Change default json lib. (#1563)
* Change default json lib.

* Remove gopsutil test.

* Fix tests.

* Ignore linter for UnmarshalFieldError.

* update
2021-10-11 08:28:06 +02:00
Ali Yusuf
0763ecdd13
fix: Add missing TargetConditionals.h include (#1572)
closes #1571
2021-10-10 17:06:17 +02:00
Jason McNeil
9f537f922d
Update load_darwin.go (#1564) 2021-10-06 22:49:23 +02:00
M. Efe Çetin
c0c14671ba
Add one minute load avg for monitor. (#1530)
Fix CI/CD errors.

Fix Windows.

Fix Windows.

Fix golint error.
2021-09-22 08:29:44 +02:00
RW
3e8227d7eb
FIX: panic: unaligned 64-bit atomic operation [32 bit machines] #1487 (#1502)
* 🐛 panic: unaligned 64-bit atomic operation [32 bit machines] #1487
https://pkg.go.dev/sync/atomic#pkg-notes
https://go101.org/article/memory-layout.html
https://github.com/golang/go/issues/36606

* 🐛 panic: unaligned 64-bit atomic operation [32 bit machines] #1487
change from uin64 to uint32 for the timestamp -> max value is 4294967295 -> Sun Feb 07 2106 06:28:15 GMT+0000
2021-08-22 10:28:34 +02:00
Kazumasa Takenaka (Bamboo)
f5338266e3
fix typo (#1442)
paramters -> parameters
avilable  -> available
seperated -> separated
2021-07-17 17:20:14 +02:00
tuhao1020
a109dc6c68
Schema parser: use full match instead of strings.HasPrefix (#1424)
* #1414 use full match instead of strings.HasPrefix

* update for  nested or recursive structs

* replace strings.Contains with strings.IndexByte
2021-07-11 11:45:15 +02:00
Javad Rajabzade
7609117cec
Improved some conditions (#1386)
* simplify `u <= (1<<7)-1` to `u < (1 << 7)`

* It's not recommended to use `len` for empty string, we can check with string with ""

* It's not recommended to use `len` for empty string, we can check with string with ""

* It's not recommended to use `len` for empty string, we can check with string with ""

* It's not recommended to use `len` for empty string, we can check with string with ""

* Instead Bool comparison can using simplified bool check if !var = false checking

* Unnecessary use of fmt.Sprintf for value without format

* For check condition two value not required ! method

* nil check may not be enough for slice, better check with len

* function parameters combined

* When the form returns error information, the text content should not start with a capital letter or end with a punctuation mark

* error var invalidPath should have name of the form errFoo, It is recommended that the error variables that are part of an API should be named

* change to condition len(x), it's faster https://github.com/gofiber/fiber/pull/1386#discussion_r652369520

* Update write.go

* Update write_bytes.go

* Update store.go

Co-authored-by: RW <rene@gofiber.io>
2021-06-17 22:03:59 +02:00
Ilya Chukov
89fdbcf036
Improve errors handling (#1381)
* replace `fmt.Errorf` to `errors.New`

* changed once `Sprintf` to `Join`
2021-06-13 11:11:42 +02:00
RW
b1b490645e
Fix session middleware (#1235)
encoding/gob for session middleware
2021-03-26 11:24:55 +01:00
Kiyon
ff2052c48a 👷 Improve tls test 2021-03-11 14:33:04 +08:00
TroyDota
80fadc607c
Update memory.go 2021-02-15 04:07:51 +02:00
unknown
c62e5f7d4d go style updates 2021-01-26 21:57:58 +03:00
Fenny
9e87cb7c17 ✏ update msg 2020-12-06 16:39:32 +01:00
Fenny
19bee02563 🩹 draft for #1051 2020-12-03 11:56:32 +01:00
Fenny
e28c886d73 🩹 fix internal memory storage 2020-12-03 11:14:33 +01:00
Fenny
7be78406cb 🔐 use uuid v4 in session 2020-11-30 14:31:10 +01:00
Fenny
772d78186a 🐌 too slow, need better alternative 2020-11-27 18:34:22 +01:00
Fenny
0c8efc3de3 💱 update uuid 2020-11-27 16:58:19 +01:00