Commit Graph

14 Commits (v2)

Author SHA1 Message Date
leonklingele fe487934f9
utils: add Go 1.20+ way of converting byte slice to string (#2468)
Ref. d2f97fc426/b2s_old.go.
Ref. d2f97fc426/b2s_new.go.
2023-05-19 11:07:20 +02:00
leonklingele eced39c47e
utils: add Go 1.20+ way of converting string to byte slice (#2462)
* utils: add Go 1.20+ way of converting string to byte slice

Ref. d2f97fc426/s2b_old.go.
Ref. d2f97fc426/s2b_new.go.

* utils: fix golangci-lint apparently running with Go < 1.20

See https://github.com/gofiber/fiber/actions/runs/4968641325/jobs/8891360463?pr=2462.
2023-05-15 07:21:16 +02:00
leonklingele ac4ce21d9c
🐛 Bug: Fix issues introduced in linting PR (#2319)
* internal: revert linting changes

Changes to the internal package should not have been made in 167a8b5e94.

* middleware/monitor: revert changes to exported field "ChartJSURL"

This is a breaking change introduced in 167a8b5e94.

* middleware/monitor: fix error checking

Fix the errorenous error checking introduced in 167a8b5e94.

* 🐛 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>
2023-02-02 15:57:40 +01: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 e5ae764139
🧹 update: replace UnsafeBytes util with suggested way (#2204) 2022-11-13 16:58:42 +01: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
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
Paul Cento 15987a2677
♻️ Refactor: remove use of deprecated functions (#1474) 2021-08-06 07:56:36 +02:00
Fenny 0cc60e3e39 ✏ update utils
Co-Authored-By: RW <7063188+ReneWerner87@users.noreply.github.com>
2020-11-17 08:24:28 +01:00
Fenny 0e21234f5e 📦 vendor gopsutil 2020-09-27 22:56:31 +02:00
Fenny d9ca77a834 ✏ fix typo 2020-09-27 12:23:46 +02:00
Fenny d6f717148a 🛠 correct convert naming 2020-09-27 12:22:17 +02:00
Fenny b4f978515d 📝 update utils 2020-09-17 02:21:36 +02:00
Fenny a63f4f067b 🛠 export utils
Co-Authored-By: RW <7063188+ReneWerner87@users.noreply.github.com>
2020-09-14 12:16:45 +02:00