Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Response: optimize writeFile #234

Merged
merged 1 commit into from
Dec 1, 2024
Merged

Response: optimize writeFile #234

merged 1 commit into from
Dec 1, 2024

Conversation

System-Glitch
Copy link
Member

Description

  • Open file once instead of thrice in response.File() and response.Download()
  • fsutil: expanded the list of known extensions for content type detection
  • fsutil: add DetectContentType to sniff from a reader directly
  • fsutil: add DetectContentTypeByExtension for content type detection fallback

@System-Glitch System-Glitch added the enhancement Enhancement of existing feature label Nov 25, 2024
@System-Glitch System-Glitch self-assigned this Nov 25, 2024
@coveralls
Copy link

coveralls commented Nov 25, 2024

Pull Request Test Coverage Report for Build 12014898619

Details

  • 48 of 52 (92.31%) changed or added relevant lines in 2 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.02%) to 97.494%

Changes Missing Coverage Covered Lines Changed/Added Lines %
response.go 18 19 94.74%
util/fsutil/fsutil.go 30 33 90.91%
Totals Coverage Status
Change from base Build 12014896572: 0.02%
Covered Lines: 6341
Relevant Lines: 6504

💛 - Coveralls

- Open file once instead of thrice
- fsutil: expanded the list of known extensions for content type detection
- fsutil: add DetectContentType to sniff from a reader directly
- fsutil: add DetectContentTypeByExtension for content type detection fallback
@System-Glitch System-Glitch merged commit 448e78f into master Dec 1, 2024
10 checks passed
@System-Glitch System-Glitch deleted the optim/write-file branch December 1, 2024 13:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Enhancement of existing feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants