nickajacks1
4c68e0242d
ci: address multiple lint rules ( #2869 )
...
* ci: explicitly disable tagalign
Tagalign requires awkward manual formatting and doesn't provide much
value for readability.
* ci: enable mirror linter
mirror warns against certain cases of useless conversion between string
and []byte.
* ci: enable perfsprint linter
This linter encourages replacing several functions from the fmt package
with faster alternatives. While fixing issues, I also added a few
exported error types rather than returning a naked errors.New().
2024-02-19 14:33:10 +01:00
nickajacks1
827013d789
chore: Fix testifylint errors in middleware ( #2805 )
2024-01-21 08:32:23 +01:00
nickajacks1
a776d2933e
ci: re-enable tparallel linter ( #2801 )
...
In some cases, loop variables had to be reassigned to a local variable
to avoid concurrent access. This will no longer be needed when fiber's
minimum go version is bumped to 1.22, where each loop iteration gets its
own variable.
2024-01-17 09:47:26 +01:00
Muhammed Efe Cetin
6ea4d81331
Merge branch 'master' into v3-beta
2023-11-07 20:22:31 +03:00
Michael Bell
8228da91fc
[filesystem middleware] improve status for SendFile ( #2664 )
...
SendFile response code for success
2023-10-06 13:10:20 +02:00
René Werner
59409f3841
improve sendFile documentation
2023-10-06 11:43:10 +02:00
Tiago Peczenyj
0d3354675b
Fix loop variable captured by func literal ( #2660 )
...
* fix loop variable xxx captured by func literal
* fix middleware/pprof tests
2023-10-05 13:49:57 +02:00
CuiPeiyu
d0d5e9ee99
[middleware/filesystem]: Set response code ( #2632 )
...
Specified response code
2023-09-14 14:46:34 +02:00
M. Efe Çetin
9fbb961adb
filesystem: refactor: use `errors.Is` instead of `os.IsNotExist` ( #2558 )
2023-08-06 18:10:44 +02:00
Muhammed Efe Cetin
44acb06c02
🧹 v3 (chore): fix linter warnings
2023-08-05 22:25:21 +03:00
Muhammed Efe Cetin
75bb02b87e
Merge remote-tracking branch 'origin/master' into v3-beta
2023-08-05 22:02:01 +03:00
bcd
3c3f12b76c
[Feature]: Add filesystem config contentTypeCharset support ( #2438 )
...
* Update filesystem.go
* Update filesystem_test.go
* Update filesystem.md
* fmt
2023-05-02 08:40:20 +02:00
Muhammed Efe Çetin
41866cd3dd
👷 v3 (ci): fix some linter warnings
2023-03-06 17:35:39 +03:00
Muhammed Efe Çetin
15e9235383
📝 docs: remove README.mds from middleware dirs
2023-03-06 16:42:35 +03:00
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
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
Xiaoyue Lin
6dc7a123fb
📝 docs(filesystem): clean duplicated namespace for example ( #2313 )
...
chore: clean duplicated namespace
2023-01-28 15:48:43 +08: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
Xiaoyue Lin
07ab88278b
📝 docs(filesystem): fix statik filesystem middleware example typo ( #2302 )
...
docs(filesystem): fix statik filesystem middleware example typo
2023-01-18 08:23:19 +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
Xaver Fischer
6d798dbda9
📝 middleware/filesystem does not handle url encoded values on it's own ( #2247 )
...
* 📝 middleware/filesystem does not handle url encoded values
* Update README.md
add newline after first warning
Co-authored-by: Xaver Fischer <xaverfischer@mail.de>
2022-12-01 08:53:40 +01:00
Muhammed Efe Çetin
7fb50f11f6
✏️ v3 : replace utils.AssertEqual with require in filesystem mw tests
2022-09-30 18:34:38 +03:00
M. Efe Çetin
668b0c85f8
✨ v3 (enhancement): refactor filesystem middleware with `io/fs` ( #2027 )
...
* ✨ v3 (feature): refactor filesystem middleware with `io/fs`
* update docs
* attachment support.
* fix
2022-09-29 08:28:52 +02:00
dayu
d461bf231e
Update README.md ( #2114 )
...
some demo codes missing parenthesis, i added them to make that codes could be copied and run
2022-09-22 12:30:19 +03: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
Trim21
b161f805c2
v3(enhancement): remove `utils.Trim*` ( #2030 )
...
stdlib functions have same performance in go1.19
2022-08-20 13:52:09 +08:00
Muhammed Efe Çetin
4105b008c2
Merge remote-tracking branch 'origin/master' into v3-beta
2022-08-19 14:33:31 +03: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
1188144d78
🎉 v3: init
2022-05-31 17:35:49 +03: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
Fufu
8b3a06b164
Fix: file opening path and directory browsing path of filesystem ( #1547 )
...
* Fix: file opening path and directory browsing path of filesystem
* Update: utils.TrimRight instead of strings.TrimSuffix
2021-09-29 19:53:25 +02:00
Tom
21c9fb4936
🔥 Add `PathPrefix` parameter to `filesystem` middleware ( #1326 )
...
See #1308
This adds a parameter called `PathPrefix` to `filesystem.Config`
that is prepended to any filepath being read from
`filesystem.Root`.
Intended to be used with Go 1.16's `embed.FS` type.
Signed-off-by: Tom <tom@tdpain.net>
2021-05-12 08:58:01 +02:00
iRedMail
a179c6665c
✏️ FS MW: add example of embedding directory ( #1197 )
...
Co-authored-by: hi019 <65871571+hi019@users.noreply.github.com>
2021-03-02 12:12:40 -05:00
circa10a
c1386ff6c5
📝 docs: add embed example for go 1.16
2021-02-18 09:38:05 -06:00
hi019
bc7b240158
improve mw
2020-11-21 12:36:16 -05:00
renanbastos93
8ad1d16f3a
💉 test: using sendfile method
2020-10-28 11:44:14 -03:00
Fenny
c78a5013c0
update sendfile
...
Co-Authored-By: Renan Bastos <renanbastos.tec@gmail.com>
2020-10-28 05:37:07 +01:00
renanbastos93
1b4c0432c0
🔪 change signature method
2020-10-28 01:25:08 -03:00
renanbastos93
e41bf7f08f
🚀 start poc
2020-10-28 01:11:49 -03:00
Fenny
d5dbad6476
🧹 remove unused key
2020-10-27 08:14:58 +01:00
Fenny
726600f577
🧳 add maxAge to filesystem mw
2020-10-27 08:12:37 +01:00
Fenny
6395e1933c
⚠ add disclaimer to fs
2020-09-27 13:14:00 +02:00
Fenny
eaf32fa4da
⚠ add warning to FileSystem
2020-09-27 13:11:51 +02:00
kiyon
616ff8f532
👷 remove unnecessary fiber app config
2020-09-17 13:41:06 +08:00
kiyon
30783dd25d
👷 add filesystem test cases
2020-09-17 12:56:11 +08:00
Fenny
d0c541ee2b
📘 add pkger example
2020-09-16 15:38:11 +02:00
kiyon
e13411e184
👷 improve mw test cases
...
add Next test case
2020-09-16 09:44:05 +08:00
Stephan Deumier
58d657cb0a
Update filesystem.go
2020-09-14 16:12:46 +02:00
Fenny
7576f806c9
📖 update readme
2020-09-14 14:21:13 +02:00