Commit Graph

45 Commits (3168a6060591135216266fed77f8aa832dd39bb0)

Author SHA1 Message Date
Muhammed Efe Çetin 3168a60605
👷 v3 (ci): fix some linter warnings 2023-02-09 23:15:21 +03:00
Muhammed Efe Çetin 088cde594d
Merge remote-tracking branch 'origin/master' into v3-beta 2023-02-05 23:43:42 +03:00
leonklingele 167a8b5e94
🚀 Feature: Add and apply more stricter golangci-lint linting rules (#2286)
* 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 (#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 8a605c67d1
🩹 bug: use `app.getString, app.GetBytes` instead of `utils.UnsafeString, utils.UnsafeBytes` in `ctx.go` (#2297)
* 🩹 bug: use `app.getString, app.GetBytes` instead of `utils.UnsafeString, utils.UnsafeBytes` in `ctx.go`

* fix Test_Client_Debug
2023-01-15 20:56:53 +08:00
kinggo 2e3f73cb4d
optimize: use fasthttp.AddMissingPort (#2268) 2022-12-10 15:58:18 +03: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 (#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
kinggo 00ebb216d4
test: add nil jsonDecoder test case (#2139)
test: add nil jsonDecoder test case
2022-10-05 15:46:14 +02:00
M. Efe Çetin 10d6f69a89
v3 (feature): new redirection methods (#2014)
*  v3 (feature): new redirection methods

* add flash messages

* withinput, parsing flash message

* add tests

* add benchmarks

* gosec issues

* fix tests

* fix tests

* fix performance issues

* fix performance issues

* optimization.

* better names

* fix tests

* Update router.go

* fix

* fix old messaages with flash messages behavior, add new test case with req

* complete some reviews

* add pool for redirection.

* use constant

* update

*  v3 (feature): new redirection methods

* fix tests, optimize cookie parsing (9 allocs -> 1 alloc)

* test case for message includes comma

* cleanup

* optimization.

* some improvements for the redirect feature

* fix Benchmark_Redirect_Route_WithFlashMessages

* some improvements for the redirect feature

* Update redirect.go

* improve message parsing & test case

Co-authored-by: René Werner <rene@gofiber.io>
2022-09-23 08:17:34 +02:00
M. Efe Çetin 281e2f0046
v3 (feature): merge Listen methods & ListenConfig (#1930)
*  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
Muhammed Efe Çetin e3282f6408
♻️ v3 (enhancement): replace `c.Hostname()` -> `c.Host()` & add `c.Hostname()` that returns host without port 2022-09-06 18:43:06 +03: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
Trim21 80a6fdc215
client: fix `Agent` use after free (#2037)
* fix

* fix

* fix
2022-08-22 08:01:40 +02:00
Trim21 c964fda009
v3(tests): use testify for assertion (#2036)
* replace

* write

* rewrite more

* rewrite

* rewrite

* fix

* rewrite
2022-08-22 07:57:10 +02:00
M. Efe Çetin a458bd344c
v3 (feature): convert fiber.Ctx type to interface (#1928)
*  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
Muhammed Efe Çetin f119794035
v3: replace io/ioutil by io and os, update version constant 2022-06-01 18:34:22 +03:00
Muhammed Efe Çetin 1188144d78
🎉 v3: init 2022-05-31 17:35:49 +03:00
M. Efe Çetin ee65ea5bab
🧹 Use encoding/json (#1851)
* remove goccy/go-json

* fix tests.
2022-04-13 10:45:33 +02:00
Sujit Baniya 505e4d77a7
[FEATURE REQUEST] - Add RedirectToRoute and RedirectBack (#1750)
* Add Global Layout for view render

* Add test case for Views Layout

* Update ctx_test.go

* Add App Name function to pass custom app name

* Remove json tag for function

* Change func to string

* Add test for AppName

* Add RedirectToRoute and RedirectBack with fallback if referer in header not found

* replace errors.New with fmt.Errorf

* simplified code

* Add tests for different formats

* Add method to get route location and add benchmarks

* Add ToString function

* Fix error

* rearrange case for fmt.Stringer

* Fix bug for error return

* Lock latest route for app.Name(namee string)

* decreasing timeout for client test with timeout

* remove println and adjust condition to > 0

Co-authored-by: RW <rene@gofiber.io>
2022-02-09 09:02:45 +01:00
vecpeng 6036f402db
feat: add retryIf function to client agent (#1726) 2022-01-27 12:41:55 +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
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
Gusted 7b7dcf29f7
♻️ Tidy up the codebase (#1613)
* run gofmt

* add t.Helper()

* Simplify assigns

* Simplify make operation

* Remove unused field in struct

* Fix typo

* Run gofumpt ./

* Consistent spacing

* len(...) can never be negative

* Use ReplaceAll

* Simplify operation

* Remove deadcode

* Fix typo

* Tidy up `} else { if ...`

* Fix AssertEqual

* Remove t.Helper() to fix go1.14.15
2021-11-05 08:00:03 +01: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
Kiyon ff2052c48a 👷 Improve tls test 2021-03-11 14:33:04 +08:00
Kiyon 9bcfb5109d 👷 Improve test case 2021-02-22 14:48:00 +08:00
Kiyon f9d1074635 👷 Should not force Agent.dest to Agent.dest[:0] 2021-02-22 14:37:31 +08:00
Kiyon 2772af030e 👷 handle pre errors for Struct 2021-02-22 10:06:38 +08:00
Kiyon 1fddaed072 👷 Add Dest for reusing returned body bytes 2021-02-22 09:47:47 +08:00
Kiyon b5402e0f38 👷 Add SetResponse to set custom response for full control of response 2021-02-22 09:13:24 +08:00
Kiyon 169001c2e1 👷 fix golint 2021-02-22 08:47:19 +08:00
Kiyon bc9651d58b 👷 Remove custom request and export agent request 2021-02-22 08:38:54 +08:00
Kiyon c34ca83c06 👷 Add JSONEncoder and JSONDecoder 2021-02-20 16:45:13 +08:00
Kiyon c477128e5b 👷 Improve test coverage 2021-02-20 16:12:06 +08:00
Kiyon 62d311133b 👷 Add Bytes functions 2021-02-20 15:46:41 +08:00
Kiyon a60d23343c 👷 Improve test cases 2021-02-20 14:56:47 +08:00
Kiyon 040ab0e101 👷 Improve test cases 2021-02-20 14:50:37 +08:00
Kiyon 645e011813 👷 Add HEAD PUT PATCH DELETE 2021-02-20 14:50:20 +08:00
Kiyon f4307905a4 👷 Add MultipartForm 2021-02-19 17:21:59 +08:00
Kiyon 5af0d42e7b 👷 Add XML 2021-02-19 10:03:51 +08:00
Kiyon 20104ba10f 👷 Add BasicAuth 2021-02-19 09:53:51 +08:00
Kiyon 6cc4a5ec04 🍀 Cleanup 2021-02-19 09:01:54 +08:00
Kiyon e93306ca61 👷 Add BodyString 2021-02-18 17:26:13 +08:00
Kiyon 51986b2e7c 🔥 Fiber Client poc 2021-02-18 17:06:40 +08:00